Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a function that plots a specific number of cycles of the cos() function. The function should be called HW08cosineWave. The function should have one
Create a function that plots a specific number of cycles of the cos() function. The function should be called HW08cosineWave. 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 /10, and ending after the specified number of cycles. Remember, the period of one cosine wave is 2. Title your plot "Cosine Wave", label the x-axes " x ". And label the y-axis " cos(x) ". TEST: Test yout function with N=3. This should create a plot with 3 complete cycles ( x going from (0 to 6). 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: HW8cosineWave.m with N=3 NOTE: The function name and m-file name must be HW08cosineWave or the program will not run. If the program does not run there will be point deductions. You only need to submit the function m-file. Do not submit any test files. Please submit two .m-file(s) for this assignment. The solutions to both problems should be in separate .m-file(s)
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