Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
ODE45 Question Not Enough Input Argument
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hafizuddin Bin Mohd Lowhim
el 26 de Mayo de 2020
Cerrada: MATLAB Answer Bot
el 20 de Ag. de 2021
Hello,
Could anyone help why my rhs_trajectory function has Not Enough Input Argument error, please. The rhs_trajectory.m shall receive input from other functions which are thrust_force.m, drag_force.m and mass.m. The drag_force.m shall receive input from density.m function.
function dz = rhs_trajectory(z,g,F,F_d,m,gamma)
x = z(1);
y = z(2);
v_x = z(3);
v_y = z(4);
dx = v_x;
dy = v_y;
dv_x = ((F-F_d)/m)*cos(gamma); %value F,F_d,m shall be sent by thrust_force.m,drag_force.m,mass.m and the the value drag_force shall be dependent on rho from density.m
dv_y = ((F-F_d)/m)*sin(gamma)-g;
dz = [dx; dy; dv_x; dv_y];
end
I attached other mfile for reference. Please enlighten me/
0 comentarios
Respuestas (1)
darova
el 26 de Mayo de 2020
The problem is in this line
[t, z] = ode45 (@(t, z) rhs_trajectory(z, g),...
[0 tf], z0, opts);
Your rhs_trajectory function has several input paramaters. You are passing only two of them
function dz = rhs_trajectory(z,g,F,F_d,m,gamma)
2 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!