Question: ( d ) Write a Matlab script that does the following: For - 1 0 pi < = theta < = 1 0 pi create

(d) Write a Matlab script that does the following:
For -10pi <= theta <=10pi create a vector @ with 100 elements.
Use a for loop to loop over each element of 6 to create the elements of a vector y such that y = sin(theta)* cos(theta) Using an if statement, create a second vector z, so that an element of z has a value of 10 if the corresponding element of y is positive. Otherwise an element of z is given a value of 5.
Plot & versus y and @ versus z on the same graph. Include the label "8" on the x-axis.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!