Error with simultaneous differential equations
이전 댓글 표시
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?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Equation Solving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


