solving diffrential equation systems

조회 수: 25 (최근 30일)
mohsen safaei
mohsen safaei 2014년 11월 7일
답변: VBBV 2022년 3월 21일
Hello everybody I want to solve this series of diffrential equation and everytime matlab types an eror what should I do please somebody help me v1=1000; v2=1500; v3=100; k1=.1; k2=.2; k3=.4; syms f(t) g(t) y(t) S=dsolve(diff(f)==((1/v1)*(1000+100*g-1100*f-k1*v1*f)),diff(g)==((1/v2)*(1100*f-1100*g-k2*v2*g)),diff(y)==((1/v3)*(1000*g-1000y-k3*v3*y)) and f(0) and g(0) and y(0) are all zero

답변 (2개)

Torsten
Torsten 2014년 11월 7일
What exactly is the error message ?
Best wishes
Torsten.
  댓글 수: 2
mohsen safaei
mohsen safaei 2014년 11월 7일
hello this is the eror | Error: Unexpected MATLAB expression.
Torsten
Torsten 2014년 11월 10일
Maybe because there is a parenthesis missing behind the expression
S=dsolve(diff(f)==((1/v1)*(1000+100*g-1100*f-k1*v1*f)),diff(g)==((1/v2)*(1100*f-1100*g-k2*v2*g)),diff(y)==((1/v3)*(1000*g-1000y-k3*v3*y))
?
Best wishes
Torsten.

댓글을 달려면 로그인하십시오.


VBBV
VBBV 2022년 3월 21일
v1=1000;
v2=1500;
v3=100;
k1=.1; k2=.2; k3=.4;
syms f(t) g(t) y(t)
eq1 = diff(f)==((1/v1)*(1000+100*g-1100*f-k1*v1*f))
eq1(t) = 
eq2 = diff(g)==((1/v2)*(1100*f-1100*g-k2*v2*g))
eq2(t) = 
eq3 = diff(y)==((1/v3)*(1000*g-1000*y-k3*v3*y)) % use the multiplication operator
eq3(t) = 
S=dsolve([eq1 eq2 eq3])
S = struct with fields:
g: exp((t*(82^(1/2) - 32))/30)*(82^(1/2)/300 + 14/15)*(C2 - (5500*exp(-(t*(82^(1/2) - 32))/30)*(140*82^(1/2) - 41))/(178391*(82^(1/2) - 32))) - exp(-(t*(82^(1/2) + 32))/30)*(82^(1/2)/300 - 14/15)*(C3 - (5500*exp((t*(82^(1/2) + 32))/30)*(140*82^(1/… f: exp((t*(82^(1/2) - 32))/30)*((23*82^(1/2))/550 - 173/1100)*(C2 - (5500*exp(-(t*(82^(1/2) - 32))/30)*(140*82^(1/2) - 41))/(178391*(82^(1/2) - 32))) - exp(-(t*(82^(1/2) + 32))/30)*((23*82^(1/2))/550 + 173/1100)*(C3 - (5500*exp((t*(82^(1/2) + 32))… y: exp((t*(82^(1/2) - 32))/30)*(C2 - (5500*exp(-(t*(82^(1/2) - 32))/30)*(140*82^(1/2) - 41))/(178391*(82^(1/2) - 32))) + exp(-(t*(82^(1/2) + 32))/30)*(C3 - (5500*exp((t*(82^(1/2) + 32))/30)*(140*82^(1/2) + 41))/(178391*(82^(1/2) + 32))) + exp(-(52…

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by