Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started