It is easier to solve a problem than to guess, what the problem is.

Questions about FileExchange submissions are welcome - get my address from the code. I do not answer mails concerning questions in the forum.

Answered

Not Enough Input Arguments

"when you click the Run button in the future" - This means, that you tried to run the programn pressing the green triangle, the ...

Not Enough Input Arguments

"when you click the Run button in the future" - This means, that you tried to run the programn pressing the green triangle, the ...

2 días ago | 0

Answered

How can I build my own randi function from scratch?

What exactly is "from scratch"? Which tools are included, which one are excluded? E.g. where do you want to take your random bit...

How can I build my own randi function from scratch?

What exactly is "from scratch"? Which tools are included, which one are excluded? E.g. where do you want to take your random bit...

3 días ago | 0

Answered

How would I perform logical comparisons with times given in the form of a string vector?

Are you sure that this is working: temptime = IE322data{:,3}; What is the contents of IE322data ? The command works only, if t...

How would I perform logical comparisons with times given in the form of a string vector?

Are you sure that this is working: temptime = IE322data{:,3}; What is the contents of IE322data ? The command works only, if t...

3 días ago | 0

Answered

Separate correctly values in array

A = [7.046, 15.66, 24.16, 31.476, 39.42, 62.86, 69.83, 91.326, 98.586,106.672, 114.722]; B = [0.53, 1.25, 2.01, 2.78, 3.51, 4.2...

Separate correctly values in array

A = [7.046, 15.66, 24.16, 31.476, 39.42, 62.86, 69.83, 91.326, 98.586,106.672, 114.722]; B = [0.53, 1.25, 2.01, 2.78, 3.51, 4.2...

3 días ago | 0

| accepted

Answered

How to get a license?

Ask the admin of your university to contact Matlab's sales team. You find the contact address on the web site.

How to get a license?

Ask the admin of your university to contact Matlab's sales team. You find the contact address on the web site.

3 días ago | 1

Answered

Print variable in new window

This is a smart tool to create text windows: https://www.mathworks.com/matlabcentral/fileexchange/8641-jprintf

Print variable in new window

This is a smart tool to create text windows: https://www.mathworks.com/matlabcentral/fileexchange/8641-jprintf

3 días ago | 0

Answered

Need help with a While loop: Summation

You need this line: summedValue = summedValue + i; There is no need to call this function recursively, so omit the line Summa...

Need help with a While loop: Summation

You need this line: summedValue = summedValue + i; There is no need to call this function recursively, so omit the line Summa...

3 días ago | 0

Answered

How to use linspace on a matrix

A = [0.8112, 0.8861, 0.8112, 0.8861; ... 1, 1, 1, 1; ... 1, 1, 1, 1; ... 1, ...

How to use linspace on a matrix

A = [0.8112, 0.8861, 0.8112, 0.8861; ... 1, 1, 1, 1; ... 1, 1, 1, 1; ... 1, ...

3 días ago | 0

| accepted

Answered

saving image file using imread

The message tells you, that you image has unexpected dimensions. JPG and PNG accept 2D matrices and [M x N x 3] RGB arrays. The ...

saving image file using imread

The message tells you, that you image has unexpected dimensions. JPG and PNG accept 2D matrices and [M x N x 3] RGB arrays. The ...

4 días ago | 0

Answered

my graph looks weird

Maybe you want to remove the markers? stem(f,angle(X)*57.3,'linewidth',0.5, 'Marker', 'none'); If you want something else, exp...

my graph looks weird

Maybe you want to remove the markers? stem(f,angle(X)*57.3,'linewidth',0.5, 'Marker', 'none'); If you want something else, exp...

4 días ago | 0

| accepted

Answered

Need help with a for loop implementation for the below code

Multi-dim sparse arrays are not implemented in Matlab. Try to omit the sparse() . Or use https://www.mathworks.com/matlabcentra...

Need help with a for loop implementation for the below code

Multi-dim sparse arrays are not implemented in Matlab. Try to omit the sparse() . Or use https://www.mathworks.com/matlabcentra...

4 días ago | 0

Answered

Loops: For or While?

If the number of iterations is known in advance, use a FOR loop. If the number of iterations is not known in advance, but deter...

Loops: For or While?

If the number of iterations is known in advance, use a FOR loop. If the number of iterations is not known in advance, but deter...

5 días ago | 0

| accepted

Answered

How do I create a box in Matlab?

box is a built-in Matlab command. It seems, like your teacher has shadowed this function with his own function. This is a bad pr...

How do I create a box in Matlab?

box is a built-in Matlab command. It seems, like your teacher has shadowed this function with his own function. This is a bad pr...

5 días ago | 0

Answered

Distance of a point to a patch

See: https://www.mathworks.com/matlabcentral/fileexchange/52882-point2trimesh-distance-between-point-and-triangulated-surface ...

Distance of a point to a patch

See: https://www.mathworks.com/matlabcentral/fileexchange/52882-point2trimesh-distance-between-point-and-triangulated-surface ...

5 días ago | 0

Answered

Discretize sphere into 3xN points

See: https://www.mathworks.com/matlabcentral/answers/353-uniform-distribution-of-n-points-within-a-sphere https://www.mathwor...

Discretize sphere into 3xN points

See: https://www.mathworks.com/matlabcentral/answers/353-uniform-distribution-of-n-points-within-a-sphere https://www.mathwor...

5 días ago | 0

| accepted

Answered

Not enough input arguments for bisection method function.

You have defined f() with 2 input: function y = f(pH,pCO2) but you call it with 1 input only: while f(xl)*f(xu)>0 I guess yo...

Not enough input arguments for bisection method function.

You have defined f() with 2 input: function y = f(pH,pCO2) but you call it with 1 input only: while f(xl)*f(xu)>0 I guess yo...

5 días ago | 0

| accepted

Answered

How to convert nested structure to contain its original data?

myFolder1 = ('C:\Users\User\Documents\Signals'); mysignals = dir(fullfile(myFolder1, '**', '*.mat')); N = numel(mysignals); m...

How to convert nested structure to contain its original data?

myFolder1 = ('C:\Users\User\Documents\Signals'); mysignals = dir(fullfile(myFolder1, '**', '*.mat')); N = numel(mysignals); m...

5 días ago | 0

| accepted

Answered

i am getting error in line 18 of invalid use of operator.please help me solving this

For me line 18 is: subplot (1 ,3 ,1); I do not see a problem here. But in the next line: plot ([0; modes (:,1)] ,0:3 ,’bo-’ )...

i am getting error in line 18 of invalid use of operator.please help me solving this

For me line 18 is: subplot (1 ,3 ,1); I do not see a problem here. But in the next line: plot ([0; modes (:,1)] ,0:3 ,’bo-’ )...

5 días ago | 0

Answered

Zeros between Sign Change of Values in column

data = [ ... 1 0; ... 2 0; ... 3 0.00047; ... 4 ...

Zeros between Sign Change of Values in column

data = [ ... 1 0; ... 2 0; ... 3 0.00047; ... 4 ...

5 días ago | 0

| accepted

Answered

FOR LOOP , beginner question.

disp ("ANSWER"); for x = [0.10, 0.15, 0.20] d = ((34.63 / x) - 5.126) / 2.54; fprintf("%12g%12g\n", x, d) end Or: x ...

FOR LOOP , beginner question.

disp ("ANSWER"); for x = [0.10, 0.15, 0.20] d = ((34.63 / x) - 5.126) / 2.54; fprintf("%12g%12g\n", x, d) end Or: x ...

5 días ago | 0

Answered

Use of break in if?

"MAtlab donot work in more than 6 (if() elseif() else end)" - of course Matlab handles much more nested IF branchs than 6. Chec...

Use of break in if?

"MAtlab donot work in more than 6 (if() elseif() else end)" - of course Matlab handles much more nested IF branchs than 6. Chec...

5 días ago | 0

Answered

Intersect for multiple vectors

If this is the goal: "find elements that are common to at least two vectors": A = [1 2 3 7]; B = [2 2 4 6]; C = [1 3 2 5]; ...

Intersect for multiple vectors

If this is the goal: "find elements that are common to at least two vectors": A = [1 2 3 7]; B = [2 2 4 6]; C = [1 3 2 5]; ...

5 días ago | 1

| accepted

Answered

Exiting if condition when condition is not met, but continue for loop

The continue statement does proceed the loop, exactly as you have described your needs. Why do you think, that "it does not prom...

Exiting if condition when condition is not met, but continue for loop

The continue statement does proceed the loop, exactly as you have described your needs. Why do you think, that "it does not prom...

5 días ago | 0

| accepted

Answered

Angles from different triangles calculated simultaneously - Matrix Dimension Problem and Storage of values

What about moving the code to display one triangle into a function? %First Triangle Second Triangle ShowTri([-0.06541...

Angles from different triangles calculated simultaneously - Matrix Dimension Problem and Storage of values

What about moving the code to display one triangle into a function? %First Triangle Second Triangle ShowTri([-0.06541...

5 días ago | 0

| accepted

Answered

How to find an array in a vector or matrix?

The output of FIND shows you, that qp100max is not the maximum value of q_p_d100, but it is not even an element of the vector: ...

How to find an array in a vector or matrix?

The output of FIND shows you, that qp100max is not the maximum value of q_p_d100, but it is not even an element of the vector: ...

6 días ago | 1

| accepted

Answered

Matlab don't show calculated variables.

I get a dfifferent output than you: syms C0 C1 C2 C3 X L P EI1 EI2 Y(X)=C0+C1*X+C2*X^2+C3*X^3; dY(X)=diff(Y(X),X); d2Y(X)=di...

Matlab don't show calculated variables.

I get a dfifferent output than you: syms C0 C1 C2 C3 X L P EI1 EI2 Y(X)=C0+C1*X+C2*X^2+C3*X^3; dY(X)=diff(Y(X),X); d2Y(X)=di...

6 días ago | 1

Answered

Granting MATLAB permissions to access folders

To modify Matlab's path variable, you need access to: fullfile(matlabroot, 'toolbox', 'local') Here the path is stored in path...

Granting MATLAB permissions to access folders

To modify Matlab's path variable, you need access to: fullfile(matlabroot, 'toolbox', 'local') Here the path is stored in path...

6 días ago | 0

Answered

Using randperm in a loop

a1=[]; for oz=1:999 index=randperm(numel(VID1),2); if ismember(index,a1)==1 continue end a1=[a1; index];...

Using randperm in a loop

a1=[]; for oz=1:999 index=randperm(numel(VID1),2); if ismember(index,a1)==1 continue end a1=[a1; index];...

6 días ago | 0

| accepted

Answered

Stop automatically showing "data tips"

Include this in the startup.m function: if ~verLessThan('MATLAB','9.7') set(groot, 'defaultAxesCreateFcn', @(ax,~) disable...

Stop automatically showing "data tips"

Include this in the startup.m function: if ~verLessThan('MATLAB','9.7') set(groot, 'defaultAxesCreateFcn', @(ax,~) disable...

7 días ago | 0

| accepted

Answered

How to call a function, como llamar una funcion

Insert the code into a file called "bissecion.m" and save it to a folder, which is included in the PATH. See: doc addpath Then...

How to call a function, como llamar una funcion

Insert the code into a file called "bissecion.m" and save it to a folder, which is included in the PATH. See: doc addpath Then...

7 días ago | 1

| accepted