ode45,Too many output arguments error
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
The equation is complex , I can not get the solution, how can I solve it?
0 Commenti
Risposta accettata
Jan
il 23 Mar 2022
Modificato: Jan
il 23 Mar 2022
The complete error message is (remember to include it in a question, whenever an error occurs):
The Problem occurs here:
function [du] = mart( t,u )
...
Mt=@(t) 9.6*sin(w*t);
...
F = [m(1)*e(1)*w^2*cwt+c(1)*e(1)*w*swt-c(1)*e(2)*w*swt-k(1)*e(1)*cwt+k(1)*e(2)*cwt+Fz(t)
m(2)*e(2)*w^2*cwt-c(1)*e(1)*w*swt+c(1)*e(2)*w*swt+c(2)*e(2)*w*swt-c(2)*e(3)*w*swt+k(1)*e(1)*cwt-k(1)*e(2)*cwt-k(2)*e(2)*cwt-k(2)*e(3)*cwt
m(3)*e(3)*w^2*cwt-c(2)*e(2)*w*swt+c(2)*e(3)*w*swt+c(3)*e(3)*w*swt-c(3)*e(4)*w*swt+k(2)*e(2)*cwt-k(2)*e(3)*cwt-k(3)*e(3)*cwt-k(3)*e(4)*cwt
m(4)*e(4)*w^2*cwt-c(3)*e(3)*w*swt+c(3)*e(4)*w*swt+c(4)*e(4)*w*swt-c(4)*e(5)*w*swt+k(3)*e(3)*cwt-k(3)*e(4)*cwt-k(4)*e(4)*cwt-k(4)*e(5)*cwt
m(5)*e(5)*w^2*swt+c(4)*e(4)*w*swt-c(4)*e(5)*w*swt-k(4)*e(4)*cwt+k(4)*e(5)*cwt
m(1)*e(1)*w^2*swt+c(1)*e(1)*w*swt-c(1)*e(2)*w*swt-k(1)*e(1)*cwt+k(1)*e(2)*cwt+Fy(t)
m(2)*e(2)*w^2*swt+c(1)*e(1)*w*cwt-c(1)*e(2)*w*cwt-c(2)*e(2)*w*cwt+c(2)*e(3)*w*cwt+k(1)*e(1)*swt-k(1)*e(2)*swt-k(2)*e(2)*swt+k(2)*e(3)*swt
m(3)*e(3)*w^2*swt+c(2)*e(2)*w*cwt-c(2)*e(3)*w*cwt-c(3)*e(3)*w*cwt+c(3)*e(4)*w*cwt+k(2)*e(2)*swt-k(2)*e(3)*swt-k(3)*e(3)*swt+k(3)*e(4)*swt
m(4)*e(4)*w^2*swt+c(3)*e(3)*w*cwt-c(3)*e(4)*w*cwt-c(4)*e(4)*w*cwt+c(4)*e(5)*w*cwt+k(3)*e(3)*swt-k(3)*e(4)*swt-k(4)*e(4)*swt+k(4)*e(5)*swt
m(5)*e(5)*w^2*swt+c(4)*e(4)*w*swt-c(4)*e(5)*w*swt-k(4)*e(4)*cwt+k(4)*e(5)*cwt
Mt % <== here! Mt is a function handle and needs an argument
0
0
0
0];
Maybe you mean Mt(t).
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Ordinary Differential Equations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!