How Can the Output of odetovectorfield be Used

4 visualizaciones (últimos 30 días)
Paul
Paul el 18 de Nov. de 2021
Respondida: Abhishek Kolla el 5 de En. de 2022
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)
A = 
b = 
What is that result? Is there a way to sub Y1 and Y2 for Y[1] and Y[2]?

Respuestas (1)

Abhishek Kolla
Abhishek Kolla el 5 de En. de 2022
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.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by