Error with simultaneous differential equations
Ältere Kommentare anzeigen
Trying to solve:
"syms x(t) y(t) t
ode1 = diff(x,t,2)+2*x==y;
ode2 = diff(y,t,2)+2*y==x;
odes = [ode1; ode2]
cond1 = y(0)==2;
cond2 = x(0)==4;
cond3 = t(0)==0;
cond4 = diff(x,t)==0;
cond5 = diff(y,t)==0;
conds = [cond1; cond2; cond3; cond4; cond5]
[xSol(t), ySol(t)] = dsolve(odes, conds)"
BUT!
Array indices must be positive integers or logical values.
Error in indexing (line 1079)
R_tilde = builtin('subsref',L_tilde,Idx);
How to solve the error with y(0) and x(0) if it is initial condition for system of ODEs?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


