Communication through MATLAB is always better than arguing.

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

ein Tag 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)

ein Tag 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>

2 Tage 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)

3 Tage 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)

3 Tage 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])

3 Tage ago | 0

| accepted

Answered

How to combine two cell arrays?

newcellarray = [cellarray2,cellarray1]

How to combine two cell arrays?

newcellarray = [cellarray2,cellarray1]

4 Tage 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

4 Tage 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)))]

4 Tage 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

4 Tage 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_...

4 Tage 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>

5 Tage 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 .^ .* ./

5 Tage 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()* ?

5 Tage 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:...

5 Tage 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)

6 Tage 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)

6 Tage 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);

6 Tage ago | 1

Answered

Why is this if statement does not work?

Because they are float numbers, reading the below links might help you better about floating numbers: https://www.mathworks.com...

Why is this if statement does not work?

Because they are float numbers, reading the below links might help you better about floating numbers: https://www.mathworks.com...

6 Tage ago | 0

| accepted

Answered

Select values from cell array with condition using cellfun

A(cellfun(@(x) all(all(x>-6 & x<6)), A)) % for versions 2018b>= usage of all() would be all(...,[1,2])

Select values from cell array with condition using cellfun

A(cellfun(@(x) all(all(x>-6 & x<6)), A)) % for versions 2018b>= usage of all() would be all(...,[1,2])

7 Tage ago | 0

Answered

int and subs function

Run: which subs -all which error -all In command window and paste the output here. It looks like you have a script na...

int and subs function

Run: which subs -all which error -all In command window and paste the output here. It looks like you have a script na...

10 Tage ago | 0

| accepted

Question

Using least squares to find the x intercept.

I have a set of data points which represent the IV characteristics of a diode. I'm confused on how to get the threshold voltage ...

etwa 2 Monate ago | 1 answer | 0

Question

Symbolic differentiation with respect to first derivative

Is it possible to make a derivative of an equation with respective to the first derivative . Illustration: syms x(t) eq...

etwa 2 Monate ago | 1 answer | 0

Answered

Error using fsurf (too many functions) but success using ezsurf

Just vectorize the function and use function handles. To learn the proper usage of the functions that get you into a dilemma is ...

Error using fsurf (too many functions) but success using ezsurf

Just vectorize the function and use function handles. To learn the proper usage of the functions that get you into a dilemma is ...

3 Monate ago | 0

| accepted

Answered

Error: Unbalanced or unexpected parenthesis or bracket

I think name is variable, it's simply (there is no need for eval): x = name(:,1); y = name(:,2); z = name(:,3);

Error: Unbalanced or unexpected parenthesis or bracket

I think name is variable, it's simply (there is no need for eval): x = name(:,1); y = name(:,2); z = name(:,3);

4 Monate ago | 0

| accepted

Question

How to read this file in MATLAB?

I am having trouble reading the datas.

4 Monate ago | 2 answers | 0

Answered

Indexing a Matrix with a for loop

for ii = 1:numel(z) % don't name variables i or j (because they are interpreted as imaginary numbers by default)

Indexing a Matrix with a for loop

for ii = 1:numel(z) % don't name variables i or j (because they are interpreted as imaginary numbers by default)

4 Monate ago | 1

| accepted

Answered

Delete element of an array on the basis of other arrays

U = T(Y>SETT)

Delete element of an array on the basis of other arrays

U = T(Y>SETT)

5 Monate ago | 0

| accepted

Answered

How to enter this function

https://www.mathworks.com/help/matlab/learn_matlab/desktop.html

How to enter this function

https://www.mathworks.com/help/matlab/learn_matlab/desktop.html

5 Monate ago | 0