Communication through MATLAB is always better than arguing.

Answered

How to use ode45 for a row vector

<https://www.mathworks.com/matlabcentral/answers/1971-when-using-ode45-or-similar-functions-what-is-the-benefit-of-using-anonymo...

How to use ode45 for a row vector

<https://www.mathworks.com/matlabcentral/answers/1971-when-using-ode45-or-similar-functions-what-is-the-benefit-of-using-anonymo...

2 days ago | 1

Answered

I'm having trouble with the differential equation example:

function dydt = lineary1(t,y) % should be saved as lineary1.m dydt = y(1); And in another file named "Experiment.m" [t,y] = o...

I'm having trouble with the differential equation example:

function dydt = lineary1(t,y) % should be saved as lineary1.m dydt = y(1); And in another file named "Experiment.m" [t,y] = o...

9 days ago | 0

Answered

"Non enough input arguments" to solve non linear equations

Name of the script should be different than that of the function.

"Non enough input arguments" to solve non linear equations

Name of the script should be different than that of the function.

9 days ago | 0

| accepted

Answered

How to add a constant to a symbolic array element by element?

They are not negative numbers but probably represented in scientific notations. format longg % at the beginning Because the a...

How to add a constant to a symbolic array element by element?

They are not negative numbers but probably represented in scientific notations. format longg % at the beginning Because the a...

10 days ago | 0

Answered

Extracting values within a matrix

Use logical operators ">" "<" and "find()"

Extracting values within a matrix

Use logical operators ">" "<" and "find()"

10 days ago | 0

Answered

make rectangular with vectors

plot(a,b,'-ok') % look here plot(b,c,'-ok') plot(c,d,'-ok') plot(d,a,'-ok')

make rectangular with vectors

plot(a,b,'-ok') % look here plot(b,c,'-ok') plot(c,d,'-ok') plot(d,a,'-ok')

11 days ago | 0

Answered

Problem with find string in array

Wanted = ismember(cellstr(Mfg),'bmw')

Problem with find string in array

Wanted = ismember(cellstr(Mfg),'bmw')

11 days ago | 1

| accepted

Answered

arc question about implementing angle using linspace

if you are looking to convert radians to degrees use the function rad2deg() function

arc question about implementing angle using linspace

if you are looking to convert radians to degrees use the function rad2deg() function

14 days ago | 0

Answered

Custom Simulink IO block

According to the error message you need to have: MATLAB/SupportPackages/R2019b/toolbox/matlab/hardware/supportpackages/arduinoi...

Custom Simulink IO block

According to the error message you need to have: MATLAB/SupportPackages/R2019b/toolbox/matlab/hardware/supportpackages/arduinoi...

16 days ago | 0

Answered

matlab give me error when i use fzero to calculate zero of function

Just go to the file location and rename the file as *myFzero.m* for example.

matlab give me error when i use fzero to calculate zero of function

Just go to the file location and rename the file as *myFzero.m* for example.

18 days ago | 1

| accepted

Answered

Error: too many outputs

function Y = ForwardSub(L,b) % you forgot to assign the output in the function definition

Error: too many outputs

function Y = ForwardSub(L,b) % you forgot to assign the output in the function definition

1 month ago | 0

Answered

Raising a matrix to the power from 0 to 50

Wanted = arrayfun(@(x)A^x,0:50,'un',0); celldisp(Wanted)

Raising a matrix to the power from 0 to 50

Wanted = arrayfun(@(x)A^x,0:50,'un',0); celldisp(Wanted)

1 month ago | 0

Answered

not enough input arguments

<https://www.mathworks.com/help/matlab/matlab_prog/run-functions-in-the-editor.html>

not enough input arguments

<https://www.mathworks.com/help/matlab/matlab_prog/run-functions-in-the-editor.html>

1 month ago | 0

Answered

Numbering table and selecting value

Try replacing Name==result with strcmp(crossSectionInfo.Name,result)

Numbering table and selecting value

Try replacing Name==result with strcmp(crossSectionInfo.Name,result)

1 month ago | 0

Answered

How to replace the 5 in my vector with decreasing numbers like 5,4,3,2,1

Z=num2cell(x); Z(cellfun(@(zx)zx==5,Z))={5:-1:1} celldisp(Z)

How to replace the 5 in my vector with decreasing numbers like 5,4,3,2,1

Z=num2cell(x); Z(cellfun(@(zx)zx==5,Z))={5:-1:1} celldisp(Z)

1 month ago | 0

Answered

plotting with respect to time

C1=x0; C2=x_dot+Wn*x0; x = @(t) (C1+C2*t)*exp(-Wn*t) fplot(x,[0,10])

plotting with respect to time

C1=x0; C2=x_dot+Wn*x0; x = @(t) (C1+C2*t)*exp(-Wn*t) fplot(x,[0,10])

1 month ago | 0

| accepted

Answered

How to combine two cell arrays?

newcellarray = [cellarray2,cellarray1]

How to combine two cell arrays?

newcellarray = [cellarray2,cellarray1]

1 month ago | 0

| accepted

Answered

Storing double output into a single cell array

zeros() to cell() and A{n,k} = selectedlocal

Storing double output into a single cell array

zeros() to cell() and A{n,k} = selectedlocal

1 month ago | 1

| accepted

Answered

How to find the element of a number if that number were to be placed in an ordered list?

Between = [find(ismember(list1,fix(2.5))), find(ismember(list1,ceil(2.5)))]

How to find the element of a number if that number were to be placed in an ordered list?

Between = [find(ismember(list1,fix(2.5))), find(ismember(list1,ceil(2.5)))]

1 month ago | 0

Answered

How to solve for T2? it is giving an error when I try solve

syms T2 TempCumene = vpasolve ((((281.4749/3600)*Cp_b)*(T2-414.95) == Q_b),T2) %temp for cumene outlet in K

How to solve for T2? it is giving an error when I try solve

syms T2 TempCumene = vpasolve ((((281.4749/3600)*Cp_b)*(T2-414.95) == Q_b),T2) %temp for cumene outlet in K

1 month ago | 0

| accepted

Answered

How to create an integral function? Trying to solve Cp_b between 2 numbers

clear all %%Calculate Benzene Duty Q %From Perry's table 2-153 values for Benzene C1_b = 162940; %in J/kmol*K C2_...

How to create an integral function? Trying to solve Cp_b between 2 numbers

clear all %%Calculate Benzene Duty Q %From Perry's table 2-153 values for Benzene C1_b = 162940; %in J/kmol*K C2_...

1 month ago | 0

Answered

Help me pls I don't know matlab

<https://www.mathworks.com/matlabcentral/answers/297463-how-to-create-an-mxn-matrix-with-a-for-loop#accepted_answer_230016>

Help me pls I don't know matlab

<https://www.mathworks.com/matlabcentral/answers/297463-how-to-create-an-mxn-matrix-with-a-for-loop#accepted_answer_230016>

1 month ago | 0

Answered

Log scale x axis?

set(gca, 'XScale','log') % at the end To turn off the warning simply use dots before arithmetic operators .^ .* ./

Log scale x axis?

set(gca, 'XScale','log') % at the end To turn off the warning simply use dots before arithmetic operators .^ .* ./

1 month ago | 0

| accepted

Answered

Why is this so slow?

Instead of loop why not simply use *cumsum()* ?

Why is this so slow?

Instead of loop why not simply use *cumsum()* ?

1 month ago | 0

| accepted

Answered

How to store " first_element " values?

A = [ 1 1 1 1 2 3 4 4 4 ; 1 2 3 4 5 5 5 5 5]; [first_element,end_element] = deal(zeros(size(A,1),1)); % preallocate for k = 1:...

How to store " first_element " values?

A = [ 1 1 1 1 2 3 4 4 4 ; 1 2 3 4 5 5 5 5 5]; [first_element,end_element] = deal(zeros(size(A,1),1)); % preallocate for k = 1:...

1 month ago | 1

| accepted

Answered

Why can't a variable holding an equation be used to make a function handle?

I would simply use matlabFunction() as sir Walter says but maybe you have the follwing in mind: func = @(x) eqn(x)

Why can't a variable holding an equation be used to make a function handle?

I would simply use matlabFunction() as sir Walter says but maybe you have the follwing in mind: func = @(x) eqn(x)

1 month ago | 0

| accepted

Answered

My function will not work to calculate the 'Cumene inlet temperature' section

func= (Mc*Cp(T))*(T-T1) - (Qb)

My function will not work to calculate the 'Cumene inlet temperature' section

func= (Mc*Cp(T))*(T-T1) - (Qb)

1 month ago | 0

| accepted

Answered

Undefined function 'cos' for input arguments of type 'tf'.

syms s % forgot to add this part theta1=((3/8)*pi)+((1/8)*pi*cos(((pi/.3)*s)+(pi/16))); theta1s=laplace(theta1);

Undefined function 'cos' for input arguments of type 'tf'.

syms s % forgot to add this part theta1=((3/8)*pi)+((1/8)*pi*cos(((pi/.3)*s)+(pi/16))); theta1s=laplace(theta1);

1 month ago | 1