photo

Nana


North Carolina A&T State University

Actif depuis 2011

Followers: 0   Following: 0

Message

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?

Statistiques

MATLAB Answers

1 Question
0 Réponses

RANG
198 881
of 300 781

RÉPUTATION
0

CONTRIBUTIONS
1 Question
0 Réponses

ACCEPTATION DE VOS RÉPONSES
0.0%

VOTES REÇUS
0

RANG
 of 21 088

RÉPUTATION
N/A

CLASSEMENT MOYEN
0.00

CONTRIBUTIONS
0 Fichier

TÉLÉCHARGEMENTS
0

ALL TIME TÉLÉCHARGEMENTS
0

RANG

of 171 031

CONTRIBUTIONS
0 Problèmes
0 Solutions

SCORE
0

NOMBRE DE BADGES
0

CONTRIBUTIONS
0 Publications

CONTRIBUTIONS
0 Public Chaîne

CLASSEMENT MOYEN

CONTRIBUTIONS
0 Point fort

NOMBRE MOYEN DE LIKES

Feeds

Afficher par

Question


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...

plus de 14 ans il y a | 2 réponses | 0

2

réponses