フィルターのクリア

odeToVectorField: Unable to convert the initial value problem to an equivalent dynamical system.

4 ビュー (過去 30 日間)
Could anyone help me with following Matlab codes. Why do they generate error and how to fix them?
syms t v1(t) v2(t) v3(t)
equ=[v1(t) == 10e-03*sin(2*pi*1e08*t);...
1e-00*(v2(t)-v1(t))+1e-03*(v2(t)-v3(t))+1e-09*diff(v2(t)-v3(t),t) == 0;...
1e-03*(v3(t)-v2(t))+1e-09*diff(v3(t)-v2(t),t)+1e-03*v3(t) == 0];
Vect=odeToVectorField(equ);
  2 件のコメント
madhan ravi
madhan ravi 2019 年 1 月 10 日
編集済み: madhan ravi 2019 年 1 月 10 日
https://www.mathworks.com/help/symbolic/odetovectorfield.html#bvlqf2q-6 , could you upload the latex form of the equations ?
S H
S H 2019 年 1 月 10 日
How is that neccessary? Can you explain?

サインインしてコメントする。

採用された回答

Stephan
Stephan 2019 年 1 月 10 日
Hi,
i deleted my first answer - cause your comment brought me to a new thought - DAE:
syms t v1(t) v2(t) v3(t)
eq1 = v1(t) == 10e-03*sin(2*pi*1e08*t);
eq2 = 1e-00*(v2(t)-v1(t))+1e-03*(v2(t)-v3(t))+1e-09*diff(v2(t)-v3(t),t) == 0;
eq3 = 1e-03*(v3(t)-v2(t))+1e-09*diff(v3(t)-v2(t),t)+1e-03*v3(t) == 0;
eqs = [eq1 eq2 eq3];
vars = [v1 v2 v3];
f = daeFunction(eqs,vars)
This works and gives you a function handle which can be used with ode15i:
f =
function_handle with value:
@(t,in2,in3)[in2(1,:)-sin(t.*6.283185307179586e8)./1.0e2;in3(2,:)./1.0e9-in3(3,:)./1.0e9-in2(1,:)+in2(2,:).*1.001-in2(3,:)./1.0e3;in3(2,:).*(-1.0e-9)+in3(3,:)./1.0e9-in2(2,:)./1.0e3+in2(3,:)./5.0e2]
I'm sorry that I notice so late!
Best regards
Stephan
  4 件のコメント
S H
S H 2019 年 1 月 10 日
I will read about it. Thank you.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by