Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started