How Can the Output of odetovectorfield be Used
显示 更早的评论
Other than sending to matlabFunction(), how can one use the output of odetovectorfield?
syms x(t)
eqn = diff(x(t),t,2) + diff(x(t),t) + x == 0;
V = odeToVectorField(eqn);
V =
Y[2]
- Y[1] - Y[2]
What are these things with sqaure brackets and how can I do anything with V? For example, suppose I want express V as A*Y
[A,b] = equationsToMatrix(V==0)
What is that result? Is there a way to sub Y1 and Y2 for Y[1] and Y[2]?
回答(1 个)
Abhishek Kolla
2022-1-5
0 个投票
Hi Paul,
The elements of V represent the system of first order differential equations. You can refer to this link for more information on the relation between output and input.
The function equationstomatrix converts the equations in V to matrix form. A represent left side cooefficients and b represent right side constant part in the system of linear equations obtained from V. You can refer to this link for more examples.
类别
在 帮助中心 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!