Question: y 1 ' = 6 y 1 + 8 y 2 + 3 e - 2 x y 2 ' = 3 y 1 +
In my attempt in using MATLAB to solve for the general solution of ODE as shown and particular solution if y of the question as shown in the picuture. The following are my codings:
Define the system
function dxdt systemx t
x x;
x x;
dxdt xxexpt; x xexpt;
end
Define the initial conditions
x; ;
Define the time points
t ::;
Solve the system
t x ode@system, t x;
Plot the solution
plott x:b t x:r;
xlabelTime;
ylabelx and x;
legendxx;
However, it outputs errors as shown below, i don't know where did i do wrong. Please correct and teach me
Index exceeds the number of array elements. Index must not exceed
Error in ODEQsystem line
x x;
Error in odearguments line
f odetyargs:; ODEI sets args to yp
Error in odeline
odeargumentsodeIsFuncHandleodeTreatAsMFile, solvername, ode, tspan, y options, varargin;
Error in ODEQline
t x ode@system, t x;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
