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
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