Answered

I think this is a documentation error

No, ldivide says B.\A divides each element of A by the corresponding element of B whereas ldivide says A./B divides each elem...

I think this is a documentation error

No, ldivide says B.\A divides each element of A by the corresponding element of B whereas ldivide says A./B divides each elem...

2 hours ago | 1

Answered

Not enough input arguments

You would get that error if you are passing in a function handle as the first parameter, and the function handle requires more t...

Not enough input arguments

You would get that error if you are passing in a function handle as the first parameter, and the function handle requires more t...

2 hours ago | 0

Answered

Get substring from text

S = {'Hi B', 'Hi A', 'Hey guys D can''t come', 'Too Bad C', 'I Feel bad for D'}; names = {'A', 'B', 'C', 'D'}; namepattern =...

Get substring from text

S = {'Hi B', 'Hi A', 'Hey guys D can''t come', 'Too Bad C', 'I Feel bad for D'}; names = {'A', 'B', 'C', 'D'}; namepattern =...

3 hours ago | 0

Answered

How to save UIFIGURE or UITABLE as a jpg?

it seems uitable cannot (anymore) be added to a figure but must be added to uifigure That is not correct. uit = uitable(figure...

How to save UIFIGURE or UITABLE as a jpg?

it seems uitable cannot (anymore) be added to a figure but must be added to uifigure That is not correct. uit = uitable(figure...

3 hours ago | 0

Answered

Some aspects of the array syntax are great, others are a bit puzzling

[1 2 [3 4] 5] is short for horzcat(1, 2, [3 4], 5) which in turn would be short for horzcat(1, 2, horzcat(3, 4), 5) and the...

Some aspects of the array syntax are great, others are a bit puzzling

[1 2 [3 4] 5] is short for horzcat(1, 2, [3 4], 5) which in turn would be short for horzcat(1, 2, horzcat(3, 4), 5) and the...

10 hours ago | 0

| accepted

Answered

Encode and Decode Problem

fread() returns a column vector by default. c = fread(fid) .';

Encode and Decode Problem

fread() returns a column vector by default. c = fread(fid) .';

10 hours ago | 0

| accepted

Answered

Plugging in matrix values into function handle of more than 1 variables

x=sym('x',[1 9]); x0=sym('x0',[1 9]); Yr=sym('Yr',[3 3]); Yi=sym('Yi',[3 3]); f(1,1)=x(1)+Yr(2,2)*x0(3)+Yi(1,2)*x(4)+Yr(3,3)...

Plugging in matrix values into function handle of more than 1 variables

x=sym('x',[1 9]); x0=sym('x0',[1 9]); Yr=sym('Yr',[3 3]); Yi=sym('Yi',[3 3]); f(1,1)=x(1)+Yr(2,2)*x0(3)+Yi(1,2)*x(4)+Yr(3,3)...

10 hours ago | 0

| accepted

Answered

DataStore function returns an error

Notice from the header that this is R2018b. Notice from the output that R2018b does not have a problem with that command.

DataStore function returns an error

Notice from the header that this is R2018b. Notice from the output that R2018b does not have a problem with that command.

1 day ago | 0

Answered

Understanding how to use the function griddata

graph = xlsread('Path3.xlsx'); x=graph(:,1); y=graph(:,2); z=graph(:,3); [X,Y]= meshgrid(x,y); Z = griddata(x,y,z,X,Y); su...

Understanding how to use the function griddata

graph = xlsread('Path3.xlsx'); x=graph(:,1); y=graph(:,2); z=graph(:,3); [X,Y]= meshgrid(x,y); Z = griddata(x,y,z,X,Y); su...

1 day ago | 0

| accepted

Answered

instead of saving a mat file i want ro save a .txt, i want to use fopen, fclose, and fprintf

fid = fopen('OutputFile.txt', 'w'); fprintf(fid, '%d\n', 1:10); fclose(fid)

instead of saving a mat file i want ro save a .txt, i want to use fopen, fclose, and fprintf

fid = fopen('OutputFile.txt', 'w'); fprintf(fid, '%d\n', 1:10); fclose(fid)

1 day ago | 1

Answered

the purpose of %f

On output, %d is intended for signed integer; %f is intended for fixed-point representation. On input formats, such as textscan...

the purpose of %f

On output, %d is intended for signed integer; %f is intended for fixed-point representation. On input formats, such as textscan...

1 day ago | 0

Answered

Picking random numbers with some predefined probability

1) I have predefined probabilities of picking random numbers which is p = [0.16 0.24 0.28 0.32] for the intervals [3.3 4.6], [4....

Picking random numbers with some predefined probability

1) I have predefined probabilities of picking random numbers which is p = [0.16 0.24 0.28 0.32] for the intervals [3.3 4.6], [4....

1 day ago | 0

| accepted

Answered

what is fileID in matlab?

Computer languages, and operating systems, need to maintain information about every file that the program is using, such as whic...

what is fileID in matlab?

Computer languages, and operating systems, need to maintain information about every file that the program is using, such as whic...

1 day ago | 0

Answered

I keep on getting this error when I try to turn my given data into a graph

In some cases, the data forms an implicit grid. For example if your longitude repeated every 5 values and your latitude had 5 c...

I keep on getting this error when I try to turn my given data into a graph

In some cases, the data forms an implicit grid. For example if your longitude repeated every 5 values and your latitude had 5 c...

1 day ago | 0

Answered

How do I wait for a function to complete in some stipulated time or move on?

MATLAB has some undocumented method of restricting CPU time that it uses for MATLAB Online and for Cody. I have not been able to...

How do I wait for a function to complete in some stipulated time or move on?

MATLAB has some undocumented method of restricting CPU time that it uses for MATLAB Online and for Cody. I have not been able to...

1 day ago | 1

Answered

Converting string to number with spaces

str = "111001000100 100000100000 1100100100"; cellfun(@bin2dec, regexp(str, '\s+', 'split'))

Converting string to number with spaces

str = "111001000100 100000100000 1100100100"; cellfun(@bin2dec, regexp(str, '\s+', 'split'))

1 day ago | 0

Answered

Extraction of elements of an array inside the other array

period(t1,t2,t3) =time(p) So t1, t2, t3 are subscripts, and time(p) is either a function or array that results in either a scal...

Extraction of elements of an array inside the other array

period(t1,t2,t3) =time(p) So t1, t2, t3 are subscripts, and time(p) is either a function or array that results in either a scal...

1 day ago | 0

Answered

vpasolve won't solve function

A1 = 817.08; A2 = 1051.38; A3 = 1267.56; A4 = 1183.44; B1 = 4.402229; B2 = 4.517190; B3 = 4.617679; B4 = 4.474013; x1 = ...

vpasolve won't solve function

A1 = 817.08; A2 = 1051.38; A3 = 1267.56; A4 = 1183.44; B1 = 4.402229; B2 = 4.517190; B3 = 4.617679; B4 = 4.474013; x1 = ...

1 day ago | 1

Answered

Using Symbolic Variable in ODE45 without Separate Function and other advice

dT = matlabFunction(Hr*k*Ca^2/(2*Cao*Cpa) + UAVr/(2*Cao*Cpa)*(Ta-T), 'vars', {t, T}); and [t,T] = ode45(dT,tspan,300);

Using Symbolic Variable in ODE45 without Separate Function and other advice

dT = matlabFunction(Hr*k*Ca^2/(2*Cao*Cpa) + UAVr/(2*Cao*Cpa)*(Ta-T), 'vars', {t, T}); and [t,T] = ode45(dT,tspan,300);

1 day ago | 1

Answered

How make MATLAB waitbar message indicate the filename being processed?

persistent h if isempty(h) || ~isvalid(h) h = waitbar(0,'Please wait...'); end for step = 1:1000 thisfilename = FileNa...

How make MATLAB waitbar message indicate the filename being processed?

persistent h if isempty(h) || ~isvalid(h) h = waitbar(0,'Please wait...'); end for step = 1:1000 thisfilename = FileNa...

1 day ago | 0

| accepted

Answered

Error using fplot: Warning: Error updating FunctionLine.

V = [30, 123, 400, 900]; nV = length(V); for K = 1 : nV subplot(1,nV,K) fplot(@(ay) -maxax(ay, sqrt(V(K)*ay)), [0 5]...

Error using fplot: Warning: Error updating FunctionLine.

V = [30, 123, 400, 900]; nV = length(V); for K = 1 : nV subplot(1,nV,K) fplot(@(ay) -maxax(ay, sqrt(V(K)*ay)), [0 5]...

1 day ago | 0

Answered

Is it possible Matlab shows the grid on the surface of the plot?

X=-10:.1:10; T=-10:.1:10; %i=1; w0=1; c=-1; mu1=.4*1i; a=2*mu1.^2-(2*w0.^2); [x,t]=meshgrid(X,T); u=2*(1i*mu1.*x-(1i*mu1...

Is it possible Matlab shows the grid on the surface of the plot?

X=-10:.1:10; T=-10:.1:10; %i=1; w0=1; c=-1; mu1=.4*1i; a=2*mu1.^2-(2*w0.^2); [x,t]=meshgrid(X,T); u=2*(1i*mu1.*x-(1i*mu1...

2 days ago | 0

Answered

Behavior of callback function?

'Callback','pressed=1' Callbacks specified as character vectors are evalin('base') and so only affect the base workspace, not l...

Behavior of callback function?

'Callback','pressed=1' Callbacks specified as character vectors are evalin('base') and so only affect the base workspace, not l...

2 days ago | 1

Answered

Find a variable as function of other variable with equations system using Symbolic ToolBox

syms a b c d; r = b+d; e = sym(pi)/10; %not pi/2, that does not have a solution! eq1 = c - a*sin(d) + b*cos(d) == 0; ...

Find a variable as function of other variable with equations system using Symbolic ToolBox

syms a b c d; r = b+d; e = sym(pi)/10; %not pi/2, that does not have a solution! eq1 = c - a*sin(d) + b*cos(d) == 0; ...

2 days ago | 0

| accepted

Answered

How to improve accuracy in fsolve?

fsolve cannot limit the range of values. fzero can limit the range of variables but only for a single function in one variabl...

How to improve accuracy in fsolve?

fsolve cannot limit the range of values. fzero can limit the range of variables but only for a single function in one variabl...

3 days ago | 0

| accepted

Answered

textread function integer error

textread() is not recommended. It is recommended that you switch to textscan() or to readtable(). textread('ERAU Womens Basketb...

textread function integer error

textread() is not recommended. It is recommended that you switch to textscan() or to readtable(). textread('ERAU Womens Basketb...

3 days ago | 0

Answered

string to argument in legend

for i=0:Nint legI(i+1) = "$${\mathcal X}_" + Nint-i + "$$"; end legend(legI)

string to argument in legend

for i=0:Nint legI(i+1) = "$${\mathcal X}_" + Nint-i + "$$"; end legend(legI)

3 days ago | 1

Answered

How can I input "function Txy (Z1,Z2,P)" properly?

You have to store the code in a file named Txy.m

How can I input "function Txy (Z1,Z2,P)" properly?

You have to store the code in a file named Txy.m

3 days ago | 0

Answered

Need to solve the roots from a large equation

You will not be able to do that. If you normalize into numerator / denominator form, then you can extract the numerator, becaus...

Need to solve the roots from a large equation

You will not be able to do that. If you normalize into numerator / denominator form, then you can extract the numerator, becaus...

3 days ago | 0

Answered

Shortcut to making an array

The shortcut is to not create those as separate variables the first time around. http://www.mathworks.com/matlabcentral/answers...

Shortcut to making an array

The shortcut is to not create those as separate variables the first time around. http://www.mathworks.com/matlabcentral/answers...

4 days ago | 0