% MATLAB solvers for First-Order IVP%% EX 1%% Atype LAB04ex1LAB04ex1%% B%%% do not print the entire vectors t and Y, but include a few values which% show where the last three maxima occur%% C%%% [ ENTER COMMENTS. Each line must have % before it ]%% D% NOTE: create a file “LAB04ex1d” which is a duplicate of LAB04ex1, but with the% initial conditions for y and v changed.% figure(1) and figure(2) also need to be changed to figure(3) and% figure(4) (in order to plot part a and part d on separate figures so they% can be compared)type LAB04ex1dLAB04ex1d%%% [ ENTER COMMENTS. Each line must have % before it ]%% EX2 %% A% create a new M-file with the differential equation changed type LAB04ex2LAB04ex2%% B % [ ENTER COMMENTS. Each line must have % before it ]%% C% [ ENTER COMMENTS. Each line must have % before it ]%% D% You will have to create another M-file, LAB04ex2d, in order for he% publishing to work in this case. % NOTE: there should only be ONE output plot for the code you write in% LAB04ex2d. The plot should superimposes solutions for y(t) from euler.m% and ode45. Include a legend to label each solution.type LAB04ex2dLAB04ex2d%%% [ ENTER COMMENTS. Each line must have % before it ]%% EX 3% NOTE: the code for this part should be very similar to what you wrote for% EX1-A. You just need to modify the system of differential equations. It’s% OK if you get an error message.type LAB04ex3LAB04ex3%% % [ ENTER COMMENTS. Each line must have % before it ]%% EX4% NOTE: this code should also be very similar to what you wrote for% EX1-A and EX3% When defining the function f at the bottom of your LAB04ex4.m file, dYdt% now needs to be a column with THREE elements. % LAB04ex4 should include commands which reproduce the plots shown in the% lab4 documenttype LAB04ex4 LAB04ex4


0 comments