Question: 6.3 Lab Exercise: Functions Write a MATLAB function for plotting a sine wave of frequency 500 Hz and amplitude of 2 units Call the function

6.3 Lab Exercise: Functions Write a MATLAB function for plotting a sine wave of frequency 500 Hz and amplitude of 2 units Call the function from the main script. Add MATLAB code and output waveform with the report. 7 Extra Exercise: This part of exercise is not mandatory, but finishing it correctlly will give you extra credit towards your final grade. 1. Reproduce the graph of the signal shown below in MATLAB. (Hint: command t0 will return a vector that matches the elements in t, holding 1s if the element meet the desired condition, and Os otherwise) 2.5 0.5 0.5 2. Consider a sinusoid signal in the form of f(t)-A sin(wt + d) + b (a) If part of the signal is shown in the figure below, what is the value of A, w, , and b? Calculate their values, show them in your report, and use them to reproduce the graph of f(t) in MATLAB. 3.5 2.5 1.5 0.5 0.5 (b) Now, write a MATLAB function that takes 4, w, , and b as inputs, and automatically plot two cycles f f(t) starting from t-0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
