답변 있음
How to specify Hexadecimal Color Code on a fit line?
This is working in modern Matlab versions: plot(1:10, rand(1, 10), 'Color', '#A2142F') For older versions: color = uint8(ssca...

대략 4년 전 | 1

답변 있음
i am getting an error in the following code ca some help to rectify ?
The code runs in the forum also, at least until: xlable('x-axis'); ylable('y-axis'); The commands are called "xlabel" and "yl...

대략 4년 전 | 0

답변 있음
datetime InputFormat error in R2021b
I guess, that you have defined "datetime" as a variable by accident. datetime = timerange('12/18/2015 08:00:00', '12/18/2015 12...

대략 4년 전 | 1

| 수락됨

답변 있음
Only Save the New Numerical Data to Text File
If you do not close a file opened by fopen with fclose is stays open. Solution: Append an fclose(fileid) after the fprintf.

대략 4년 전 | 0

답변 있음
while loop for conditional statement
Maybe: array_data=33 x 1 % double window_size=10; m_BW=0.5; var_BW=0.5; i = 1; fin = window_size; while i <= fin m_B...

대략 4년 전 | 0

| 수락됨

답변 있음
How can I assign values to a Structure with multiple subfields with one line of code?
You mention "as simple as possible". Then avoid unneeded operators e.g. by replaing: CellArr = {[1,2,3,4], [1:10], ['Man of Num...

대략 4년 전 | 0

| 수락됨

답변 있음
How can I speed up image manipulation of a .fig?
Maybe. How is your OpenGL driver set up? opengl info Which Shading and Renderer in used in the figure? Can you provide the fi...

대략 4년 전 | 0

답변 있음
For large arrays, Matrix rows carry onto next line theyre written in from a fortran program
Storing large blocks of data as source code is a bad idea. Text or binary files are much better. Matlab tries to be smart and l...

대략 4년 전 | 0

| 수락됨

답변 있음
how to do manipulation with decimal numbers in array
This cannot work reliably. Remember, that most decimal numbers cannot be represented exactly in binary format. Therefor some num...

대략 4년 전 | 0

| 수락됨

답변 있음
a run function gives an error due to size
Maybe: resultt = nan(10, 10); for bi = 1:10 r = birfazson(1, birfazson(2,:) == 1); if ~isempty(r) resultt(bi...

대략 4년 전 | 0

답변 있음
Can I comment only a section or part of a line?
No, this is not possible in Matlab. It would be dangerous also, because it could move some code on the right side of the line o...

대략 4년 전 | 1

| 수락됨

답변 있음
colon operator bug?
The colon operator works as expected. For integer values it does reply integers. But be aware of rounding effects for floating p...

대략 4년 전 | 1

답변 있음
Loop through data-struct and its sub-structs; Trouble with 'indexing' - error
You want to use "dynamic field names". Then the field name must be included in parentheses: x = DATA.(fn{N}).second-field.colum...

대략 4년 전 | 0

| 수락됨

답변 있음
Anonymous function arguments and parameters extrction
pu = @(x, y) [x,y]; a = pu(1, 2:3) b = pu(1:2, 3) isequal(a, b) This means: No, you cannot decide, what the inputs have be...

대략 4년 전 | 0

답변 있음
Differentiate different matlab instances opened in GUI
You can use FEX: CmdWinTool . If you want to set the title of Matlab's command windows from inside the startup function, you ha...

대략 4년 전 | 0

| 수락됨

답변 있음
how do i print this matrix?
Join the lines for k=10:10:160 to for k=10:10:160

대략 4년 전 | 0

| 수락됨

답변 있음
Out of memory only on Mac
Working with "int" causes problems, when some compiler uses 32 bit integers and the other 64 bit integers. mxCreateNumericArray...

대략 4년 전 | 0

답변 있음
Read csv in multiple directories in a loop
files = dir(fullfile(msFolder, '**', 'rawdata.csv')); % Search recursively n = numel(files); data = cell(1, n); frequenc...

대략 4년 전 | 0

| 수락됨

답변 있음
Change resize algorithm in figure window
If you mean, how image() resizes the data to match the pixels of the display, see: https://www.mathworks.com/matlabcentral/answe...

대략 4년 전 | 0

답변 있음
Why does not Matlab language support function/operator chaining?
Matlab does not support this, because it has not been implemented yet. Sorry. The answer is trivial. I'm using Matlab to solve...

대략 4년 전 | 0

답변 있음
How to correct my code?
I did not understand, what you are asking for (see my comment). but this piece of the code looks suspicious: A=(H(x)/a(k))-...

대략 4년 전 | 1

| 수락됨

답변 있음
why it will go wrong using 'cell'?
I confirm, that this is an inconsistent behavior. a = {[], []}; b = cell(1, 2); isequal(a, b) a{1}([]) = [] % Working: Not...

대략 4년 전 | 0

| 수락됨

답변 있음
Defining a mathematical function as the summation of multiple functions
Why do you want to create the function symbolically? It is easy to define it directly: ht = @(u1, u2, u3, u4) sum((xdata(:, 1) ...

대략 4년 전 | 0

답변 있음
Error when executing an existing code
Error: File: Untitled27.m Line: 1380 Column: 3 Unexpected MATLAB operator. (referent to: "function ret=arc2(r1,r2,h,phi)") At...

대략 4년 전 | 0

답변 있음
How do I create an element wise if-else code, and apply equations to inputs that meet certain criteria?
"Elementwise" does either mean a loop: for k = 1:numel(sigma) Y = log10(28300 * sigma(k) / Eya); ... end Or you use...

대략 4년 전 | 0

답변 있음
getting and printing data from matrix
Maybe your data are: X = [5 8 9 15 7 12; ... 1 3 2 3 1 2; ... 3 2 1 1 2 3]; If so, than...

대략 4년 전 | 0

답변 있음
How to append a vector to a cell array?
C = {[1,4,1], 0:10}; % The cell v = linspace(1, 10, 100); % The vector C{end + 1} = v; % Or: C{numel(C) + 1} = v;...

대략 4년 전 | 2

| 수락됨

답변 있음
fwrite and MATLAB for a raid0 disk - Only one lane?
What about trying it as C-Mex? data = randn(1024, 1024, 1024, 'double'); %8 GB tic uglyCWrite(data); toc // Short hack, U...

대략 4년 전 | 0

답변 있음
How to bold in a sprintf function?
Ticks = linspace(0, 30, 7); ax = axes('XLim', [0, 30], 'XTick', Ticks, ... 'TickLabelInterpreter', 'latex'); for k = 1:...

대략 4년 전 | 2

답변 있음
how can we use dynamic memory allocation in matlab?
malloc and calloc is performed by: a = zeros(1, 1e6) A free is useful under rare conditions also (huge arrays, memory exhauste...

대략 4년 전 | 0

더 보기