Convert the Mathematica expression to matlab
6 ビュー (過去 30 日間)
古いコメントを表示
Hello I want to convert the following lines to matlab.But I am unable to do it with matlab to function.Please help..
x[i_]:=x[i]=x[i-1]+h f1[t[i-1],x[i-1],y[i-1],z[i-1]]+1/2 h2 (f1(1,0,0,0)[t[i-1],x[i-1],y[i-1],z[i-1]]+f1(0,1,0,0)[t[i-1],x[i-1],y[i-1],z[i-1]] f1[t[i-1],x[i-1],y[i-1],z[i-1]]+f1(0,0,1,0)[t[i-1],x[i-1],y[i-1],z[i-1]] f2[t[i-1],x[i-1],y[i-1],z[i-1]]+f1(0,0,0,1)[t[i-1],x[i-1],y[i-1],z[i-1]] f3[t[i-1],x[i-1],y[i-1],z[i-1]])
This is implementation of Taylor series.
0 件のコメント
採用された回答
Thomas
2012 年 2 月 16 日
MAtlab has inbuilt function for Taylor series
doc taylor
2 件のコメント
Walter Roberson
2012 年 2 月 16 日
for K = 1 : length(Equations)
tans(K) = taylor(Equations(K), 3, Variables(K));
end
Looks like a single loop to me.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!