Upload the codes to the appropriate Homework Submission Folder on Moodle. The purpose of this assignment is to create several signals and waveforms in MATLAB. For each signal, a MATLAB function should be written.
More specifically, each MATLAB function should:
• Accept a certain number of inputs as parameters.
• Create the required signal.
• Return an array containing the signal as an output.
• Plot the signal, making sure that the time (in seconds) is shown properly in horizontal
In addition to the individual functions, another MATLAB script should be created, in which all
functions should be called. Each function for each signal should be called with three
different sets of parameters (three different sets of inputs).
1. A squarewave: The parameters are the period, P (sec), the percentage of time that the
signal is equal to positive value, the amplitude, A, the sampling period, T (sec), and the total
time that the signal needs to be displayed, M (sec). An example of the signal for P = 1,
%time positive = 25%, A = 3, T = 0.025, M = 2 is shown next.