필터 지우기
필터 지우기

Convert the Mathematica expression to matlab

조회 수: 4 (최근 30일)
LOKESH
LOKESH 2012년 2월 16일
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.

채택된 답변

Thomas
Thomas 2012년 2월 16일
MAtlab has inbuilt function for Taylor series
doc taylor
  댓글 수: 2
LOKESH
LOKESH 2012년 2월 16일
but here it is taylor method of order 3 for 3 different equations in one loop only.
Can i do that with inbuilt function.
Walter Roberson
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개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by