BEET2423 QUESTION 2 MATLAB Script Q2 is intended to plot three signals on separate figures. However, the script contains a few errors. Run and correct the script so that THREE (3) figures could be...



Attach correct script and graph


Given code is false.


?



BEET2423<br>QUESTION 2<br>MATLAB Script Q2 is intended to plot three signals on separate figures. However, the<br>script contains a few errors. Run and correct the script so that THREE (3) figures could<br>be produced.<br>MATLAB Script Q2<br>clc;<br>clear all;<br>close all;<br>%plot a continuous time signal<br>X = -10:0.1:10;<br>Y = 2+X:<br>figure(1);<br>p = plott(X,Y, 'LineWidth',2);<br>p.Color = 'k';<br>p.LineStyle = ';<br>grid on;<br>title'Non-Periodic Signal);<br>ylabel('Time, t');<br>ylabel('x(t));<br>ylim([-2 2]);<br>%plot a discrete time signal<br>X = -10:1:10%;<br>Y = 10-abs(X);<br>figure(2);<br>p = stem(X,Y, 'LineWidth',2);<br>p.Color = 'k';<br>p.LineStyle = ';<br>grid on;<br>title('Even signal');<br>xlabel('Sample, n');<br>ylabel('x[n]);<br>ylim([0 15]);<br>xlim([-15 15);<br>%plot a growing and decaying exponential curve<br>X = -5 :1:10;<br>a = -1.2;<br>C = 2;<br>Y = C*(a.^X);<br>% figure(3);<br>p = stemt(X,Y, 'LineWidth',2):<br>p.Color = k;<br>p.LineStyle =

Extracted text: BEET2423 QUESTION 2 MATLAB Script Q2 is intended to plot three signals on separate figures. However, the script contains a few errors. Run and correct the script so that THREE (3) figures could be produced. MATLAB Script Q2 clc; clear all; close all; %plot a continuous time signal X = -10:0.1:10; Y = 2+X: figure(1); p = plott(X,Y, 'LineWidth',2); p.Color = 'k'; p.LineStyle = '; grid on; title'Non-Periodic Signal); ylabel('Time, t'); ylabel('x(t)); ylim([-2 2]); %plot a discrete time signal X = -10:1:10%; Y = 10-abs(X); figure(2); p = stem(X,Y, 'LineWidth',2); p.Color = 'k'; p.LineStyle = '; grid on; title('Even signal'); xlabel('Sample, n'); ylabel('x[n]); ylim([0 15]); xlim([-15 15); %plot a growing and decaying exponential curve X = -5 :1:10; a = -1.2; C = 2; Y = C*(a.^X); % figure(3); p = stemt(X,Y, 'LineWidth',2): p.Color = k; p.LineStyle = "; grid on; titlle('Exponential, a < -1):="" xlabel('n');="" xlabel('x[n]');="" ylim([-9="" 9);="" answer:="" (attach="" your="" corrected="" script="" and="" graph="" here.)="" page="" 6="" of="">

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here