Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %CAP4
- N=2000;
- omega = 0.01;
- t=1:N;
- x = sin(omega*t) + 0.5*sin(2*omega*t+10) + 0.25*sin(3*omega*t+30); % 3*omega max
- figure;
- plot(t,x);
- Te = floor( 2*pi / (6*omega) ); %floor aprox
- t_es = 1:Te:N;
- x_es = x( t_es );
- hold on;
- stem( t_es, x_es );
- for i = 1:N
- s = 0;
- for k = 1:length( t_es )
- s = s + x_es(k) * sinc((3*omega*(i-t_es(k)))/pi);
- end;
- x_rec(i) = s;
- end;
- plot( t, x_rec, "r-" );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement