Question: Write a MATLAB program called SinCurve to plot one cycle of f(t)-sin(wt) using t - 100 linearly-spaced points from O to T, where T is

 Write a MATLAB program called SinCurve to plot one cycle off(t)-sin(wt) using t - 100 linearly-spaced points from O to T, where

Write a MATLAB program called SinCurve to plot one cycle of f(t)-sin(wt) using t - 100 linearly-spaced points from O to T, where T is the period of the sine curve. The period of f(t)-sin(wt) is 2pi/vw The program should prompt the user for the value of w (called angular frequency). The sine curve should be plotted with a green line, and should include a title. For example: SinCurve Enter the angular frequency: 2*pi IMPORTANT NOTE: Cody does not display a figure window, However, Cody can test for the correctness of items on the figure window. Name the input variable w. Place the array of 100 values into an output variable named t The output will look like this, for any value of w sin(wt) 0.8 0.6 0.4 0.2 0 -0.2 -0.4 0.4 0.2 0 -0.2 -0.4 0.6 -0.8 -1 0 0. 2 03 0 05 06 07 08 0.91 Your Function C Reset MATLAB Documentation I function t = SinCurve (w) 2 close au %keep this here!! 4 %Replace the line below with code to plot one cycle of sin(wt) with 100 evenly-spaced points, which are saved as 6 end

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 Databases Questions!