Question: Instructions Submit BOTH m-file (.M) and published PDF file (.PDF) for each problem. Submit both files in a single submission (you can use Add File)
Instructions
- Submit BOTH m-file (.M) and published PDF file (.PDF) for each problem. Submit both files in a single submission (you can use "Add File")
- use file names in the format "m07p02_FL.ext" for "module 07", "program 02", "FL" are your first name and last name initials, and "ext" is file extension that could be .M or .PDF. You can use the following .M file template m02p01_EJ.m
- Comment each line of your code
- Your program should have three sections:
- initialization of variables,
- processing (suppress output), and
- result output (fprintf/disp/plot as appropriate).
Problem
Write a function that accepts input vector x and returns the number of local maximums of x with value between xmin and xmax that are passed as arguments of the function.
Test the function by asking user to input values xmin and xmax, call the function and use fprintf to explain and print the result.
Use vector x from rsig.mat ( rsig.mat ) to test the file. Define the function in the same module (.M file).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
