Question: help using matlab, code needed Problem 2 (10 pts) Create a function that plots a specific number of cycles of the cosine function. The function

help using matlab, code needed
Problem 2 (10 pts) Create a function that plots a specific number of cycles of the cosine function. The function should be called cosineWave. The function should have one input, N (number of cycles), and no outputs. The function should plot the cosine wave starting at x = 0 with increments of 1/31 and end after the specified number of cycles. Remember, the period of one cosine wave is 27. Title your plot "Cosine Wave", label the x-axis "x", and label the y-axis "cos(x)". TEST: Test your function with N = 5. This should create a plot with four complete cycles (x going from 0 to 1077). Remember, you cannot run a function from within its m-file. You must call the function in a new m-file or in the Command Window. Figure 1 File Edit View Insert Tools Desktop Window Help Cosine Wave 1 0.8 0.6 0.4 0.2 (x)S00 0 -0.2 -0.4 -0.6 -0.8 -1 0 5 10 15 20 25 30 35 Figure 1: cosineWave.m with N = 5. NOTE: The function and m-file must be named cosine Wave or the program will not run. If program does not run there will be serious point deductions. You only need to submit the function m-file. Do not submit any test files
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
