How to solve ODE's in Matrix Form?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I have a set of equations like this and am clueless on how to solve on MATLAB and hope someone can help. The intial conditions are P0(0) = 1; P1(0) = 0.
![MATLAB.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206008/MATLAB.png)
4 commentaires
James Tursa
le 26 Fév 2019
Please post what you have tried and what problems you are having with your code and we can help.
Réponses (1)
Star Strider
le 26 Fév 2019
For a linear system such as yours, another option is the expm (link) function. It is the
term in the solution for a linear system:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206018/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206019/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206020/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206021/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206022/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206023/image.png)
where
= expm(A*t).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206024/image.png)
This requires a loop for the inputs and for values of ‘t’, however that is more of an inconvenience than a problem.
0 commentaires
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!