summaryrefslogtreecommitdiff
path: root/3812/CH1/EX1.6.b/1_6_b.sce
blob: 6f6f31ac2752ebbc41e8916b72517e9cbaf347f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//draw the waveform of the signal x2(t)=u(t-2)
clc;
clear all;
t=-10:.001:10;
for i=1:length(t)
if t(i)>=2 then
x(i)=1;
else
x(i)=0;
end
end
//figure
plot2d(t,x);
xtitle('Required figure','t','x(t)')