x =
inline('
upulse(t-0.5,0,0.5,0) - upulse(t,0,0,0.5)'
);
fs = 5; T = 1/fs;
tn =
0.2:T:
1; xn =
inline('
upulse(tn-0.5,0,0.5,0) - upulse(tn,0,0,0.5)'
);
% part e
fs10 = 10; T10 = 1/fs10;
tn10 =
0.1:T10:
1; xn10 =
inline('
upulse(tn-0.5,0,0.5,0) - upulse(tn,0,0,0.5)'
);
subplot(122),
plot(t, xat10,t, x
(t
), tn10, xn10
(tn10
), '
o'
)