Nana
North Carolina A&T State University
Followers: 0 Following: 0
I copied this
function dy = rigid(t,y)
dy = zeros(3,1); % a column vector
dy(1) = y(2) * y(3);
dy(2) = -y(1) * y(3);
dy(3) = -0.51 * y(1) * y(2);
options = odeset('RelTol',1e-4,'AbsTol',[1e-4 1e-4 1e-5]);
[T,Y] = ode45(@rigid,[0 12],[0 1 1],options);
plot(T,Y(:,1),'-',T,Y(:,2),'-.',T,Y(:,3),'.')
and tried to run but it gave error message "??? Input argument "y" is undefined.
Error in ==> rigid at 3
dy(1) = y(2) * y(3);
What should be the problem?
Statistica
1 Domanda
0 Risposte
RANK
259.048
of 300.753
REPUTAZIONE
0
CONTRIBUTI
1 Domanda
0 Risposte
ACCETTAZIONE DELLE RISPOSTE
0.0%
VOTI RICEVUTI
0
RANK
of 170.858
CONTRIBUTI
0 Problemi
0 Soluzioni
PUNTEGGIO
0
NUMERO DI BADGE
0
CONTRIBUTI
0 Post
CONTRIBUTI
0 Pubblico Canali
VALUTAZIONE MEDIA
CONTRIBUTI
0 Punti principali
NUMERO MEDIO DI LIKE
Feeds
Domanda
Example in your ode45 tutorial is not running
I have the same problem trying to solve 3 nonlinear differential equations for my modeling. I tried to run your own tutorial ex...
oltre 14 anni fa | 2 risposte | 0