ode45 Matlab system of differential equations
Afficher commentaires plus anciens
Hi,
I'm new to Matlab and I have been trying to solve/simulate values of my system of ordinary differential equations. Even when I copy and paste examples from the net Matlab tells me that my function is undefined. For example:
function ypsir =ypsir(t,y) a = .01; b = .1; ypsir(1) =-a*y(1)*y(2); ypsir(2) = a*y(1)*y(2)-b*y(2); ypsir(3) = b*y(2); ypsir = [ypsir(1) ypsir(2) ypsir(3)]';
Matlab will respond with
??? Input argument "y" is undefined.
Error in ==> Untitled at 4 ypsir(1) =-a*y(1)*y(2);
Can someone please explain what this means and how to fix it.
Thanks! :)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Ordinary Differential Equations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!