Note: First of all, I need to increase the amplitudeof the signal a(t) from 1 to 2, but not through the plot command.ALL IN MatLab
clc
clear all;
close all;
t=[-3:0.01:3];%time base
a=tripuls (t,4); %generating triangular waveform
b=rectpuls (t,2);%generating square waveform
plot(t,a,’r’, t,b,’b’)%plotting the square waveform
grid minor;
legend(‘a(t)’,’b(t)’)%creating a legend
xlabel(“time (s)”);%creating label
ylabel(“signals”);
title(“signals vs time”);
axis([-3, 3, 0, 2]);
Expert Answer
An answer will be send to you shortly. . . . .