Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dt = 1/1000;
- t = 0:1/1000:1.28-1/1000;
- x1 = 10000*t(1:20).^2;
- x2 = -10000*(t(21:40)-0.04).^2+8;
- x3 = 8*ones(1,20);
- x4 = -800*t(61:70)+56;
- x5 = zeros(1,10);
- x = [x1 x2 x3 x4 x5] ;
- x = [x x x x];
- x = [x x x x]; % make x to be periodic
- dtz = 1.5/100;
- tz = 0:dtz:1.28-1/1000;
- z = x(1: round(dtz/dt) : end);
- figure('Name', 'undersampled signal');
- plot(tz,z,'o',t,x,'-')
- legend('Under sampled signal', 'The original signal')
- figure('Name', 'Reconstructed signal');
- plot(t(1:5:160),z(mod((0:31)*11,16)+1), 'o',t(1:160),x(1:160), '-');
- legend('Reconstructed signal', 'The original signal')
Add Comment
Please, Sign In to add comment