Question: Write your own code (or you can continue to use the instructor's following code) that plots the slope fields of the DFQ of yy- sin(x)

Write your own code (or you can continue to use the instructor's following code) that plots the slope fields of the DFQ of yy- sin(x) in Fig. 1 clear all; clc; clf; hold on; for x -3:0.5:3 for -3:0.5:3 y= % Problem 1, p.27 use x --3:0.5:3, y -3:0.5:3 dydx = -1+y - sin(x) ; (x2,y2) %Compute the (x1,y1) %straight lines and coordinates of plot([x1, x2], [yl,y2]); end end -2 -3 -4 -3 -2 Figure 1: Slope fields of the DFQ of z-y- sin(x) Write your own code (or you can continue to use the instructor's following code) that plots the slope fields of the DFQ of yy- sin(x) in Fig. 1 clear all; clc; clf; hold on; for x -3:0.5:3 for -3:0.5:3 y= % Problem 1, p.27 use x --3:0.5:3, y -3:0.5:3 dydx = -1+y - sin(x) ; (x2,y2) %Compute the (x1,y1) %straight lines and coordinates of plot([x1, x2], [yl,y2]); end end -2 -3 -4 -3 -2 Figure 1: Slope fields of the DFQ of z-y- sin(x)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
