i am getting not enough input arguments error for the below code
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
function dx = m(t,x)
dx=zeros(4,1);
dx(1) = -(1/(8200*47*1e-9))*x(2);
dx(2) = (((x(3)-x(2))/2000) -(0.667e-3 + 0.029e-3*x(1).*x(1)*3.*x(2)))/6.8e-9;
dx(3) = ((x(2)-x(3))/2000 - x(4))/68e-9;
dx(4) = x(3)/18e-3;
[t,x] = ode15s(m,[0 50],[0 0.11 0.11 0]);
plot(x(:,2),x(:,3))
my error is like
Not enough input arguments.
Error in m (line 4)
dx(1) = -(1/(8200*47*1e-9))*x(2);
Error in untitled4 (line 3)
[t,x] = ode15s(m,[0 50],[0 0.11 0.11 0]);
>>
0 commentaires
Réponse acceptée
DGM
le 12 Fév 2022
[t,x] = ode15s(@m,[0 50],[0 0.11 0.11 0]);
plot(x(:,2),x(:,3))
function dx = m(t,x)
dx=zeros(4,1);
dx(1) = -(1/(8200*47*1e-9))*x(2);
dx(2) = (((x(3)-x(2))/2000) -(0.667e-3 + 0.029e-3*x(1).*x(1)*3.*x(2)))/6.8e-9;
dx(3) = ((x(2)-x(3))/2000 - x(4))/68e-9;
dx(4) = x(3)/18e-3;
end
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!