photo

Nana


North Carolina A&T State University

Con actividad desde 2011

Followers: 0   Following: 0

Mensaje

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?

Estadística

MATLAB Answers

1 Pregunta
0 Respuestas

CLASIFICACIÓN
259.048
of 300.753

REPUTACIÓN
0

CONTRIBUCIONES
1 Pregunta
0 Respuestas

ACEPTACIÓN DE RESPUESTAS
0.0%

VOTOS RECIBIDOS
0

CLASIFICACIÓN
 of 21.075

REPUTACIÓN
N/A

EVALUACIÓN MEDIA
0.00

CONTRIBUCIONES
0 Archivos

DESCARGAS
0

ALL TIME DESCARGAS
0

CLASIFICACIÓN

of 170.858

CONTRIBUCIONES
0 Problemas
0 Soluciones

PUNTUACIÓN
0

NÚMERO DE INSIGNIAS
0

CONTRIBUCIONES
0 Publicaciones

CONTRIBUCIONES
0 Público Canales

EVALUACIÓN MEDIA

CONTRIBUCIONES
0 Temas destacados

MEDIA DE ME GUSTA

Feeds

Ver por

Pregunta


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

más de 14 años hace | 2 respuestas | 0

2

respuestas