about python code to matlab code

5 Ansichten (letzte 30 Tage)
chae sungwon
chae sungwon am 21 Nov. 2021
Kommentiert: chae sungwon am 22 Nov. 2021
python code
for i in range(int(Lx)):
a,b,c,d=fsolve(equations,(1,1,1,1), new_Lx)
I want to translate python code to matlab code
  1 Kommentar
Walter Roberson
Walter Roberson am 21 Nov. 2021
That makes it look as-if the same equations are being solved multiple times ?
How is equations specified in the code?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 21 Nov. 2021
for i = 1 : Lx
X = fsolve(@(x)equations(x,new_Lx), [1,1,1,1]);
a = X(1); b = X(2); c = X(3); d = X(4);
end
  1 Kommentar
chae sungwon
chae sungwon am 22 Nov. 2021
Thank you for your help. I could solve it

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by