Download MATLAB codes about Differential Equations and more Assignments Differential Equations in PDF only on Docsity!
MATH156_A73_4Q2223 MATLAB GRADER M1MATLAB1: Direction Field 2. y' = sin(x-y) Notes: For the ranges: For Item No.1 Use xr? = (-5,5) with 0.5 interval yr? = (-70,10) with 0.5 interval Use 57 for the f(x,y) , x7 and y7 as the points in the rectangular coordinate system For Item No.2 Use x2 = (-10,10) with 1 interval yr2 = (-6,6) with 0.2 interval Use s2 for the f(x,y) , x2 and y2 as the points in the rectangular coordinate system Script @ % Sketch the direction fields of the given differential equations #1. y' = @.25xy*2 % 2. y' = sin(x-y) % 1. Define the ranges for exercise 1. xrl = -5:0.5:5; % the domain of x is from -5 upto 5 with @.5 interval. % Create a grid of x-y points. (xl, yl] = meshgrid(xr1,yr1); 1@)% Plot the direction field of y' = @.25xy*2. 11) 51 = 6.25*x1.*y1.*2; wor nn bw ee yrl = -10:8.5:18; % the domain of y is from -18 upto 1@ with @.5 interval. @ Reset EB MATLAB Documentation