Question: MATLAB ONLY MATLAB ONLY MATLAB ONLY MATLAB ONLY MATLAB CODE PLEASE Please comment code. 1. a)Generate a square wave of frequency 5 Hz and amplitude

MATLAB ONLY MATLAB ONLY MATLAB ONLY MATLAB ONLY MATLAB CODE PLEASE Please comment code.

1. a)Generate a square wave of frequency 5 Hz and amplitude of 4 V and frequency of 10 Hz using the MATLAB function square(2pft,duty), where duty=50 for square wave. Repeat step the first step above with duty cycle of 20% and 80% . Plot in a graph of three subplots your generated signals then select x-axis limits between 0 and 2 and y-axis limits between -5 and 5. finally, plot in a graph of three subplots your generated signals.

b) Generate a rectangle pulse with amplitude of 4 V, frequency of 10 Hz and a width of 0.2 second using the MATLAB generating function rectpuls(t,w), where w is the required pulse width. Plot in a graph your generated signal. Select x-axis limits between 0 and 0.5 and y-axis limits between -1 and + 5.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!