Submit plots of the following functions. Label all axes and include a title (and
ID: 2085778 • Letter: S
Question
Submit plots of the following functions. Label all axes and include a title (and a legend when appropriate). The first two plots are for discrete- time signals. a. 5 cos(pi n /6 - pi/2). Plot this function in a figure by itself. b. 10 sin(pi n /6). Plot this function in a figure by itself. c. 5 cos(3 pi t - pi/6). Plot this function in a figure by itself. d. 10 sin (4 pi t). Plot this function in a figure by itself e. Plot in one figure the following three signals. Use subplots to plot these three signals in one figure, one below the other. 5 cos (3 pi t - pi/6): 10 sin (4 pi t) 5 cos(3 pi t - pi/6)+ 10 sin (4 pi t) f. Plot the following four signals in one figure. Use subplots to plot the four signals in one figure, in two rows, signals (1) and (2) on the top row: (3) and (4) on the bottom row 5 cos (l0t-pi/6): 10 sin (4 pi t): 5 cos(3 pi t - pi/6)+ 10 sin (4 pi t) 5 cos(3 pi t - pi/6)- 10 sin (4 pi t)Explanation / Answer
1. code for parts a b c and d are shown below
n= -20:1:20;
a = 5*cos((pi*n)./6-pi/2);
stem(n,a)
xlabel('n')
ylabel('a')
title('plot for a')
b = 10*sin((pi*n)./6);
figure
stem(n,b)
xlabel('n')
ylabel('b')
title('plot for b')
t = -5:0.1:5;
c = 5*cos(3*pi*t-pi/6);
figure
plot(t,c)
xlabel('n')
ylabel('c')
title('plot for c')
d =10*sin(4*pi*t);
figure
plot(t,d)
xlabel('n')
ylabel('d')
title('plot for d')