Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all;
- close all;
- C=100000;
- t=(0:1/100000:1);
- xt=sin(2*pi*50*t);
- Decim=100;
- fs=C/Decim;
- str=sprintf('fs=%.2f', fs), disp(fs);
- n=t(1:Decim:end);
- ind=fix(n*C+1)
- xn=xt(ind);
- plot(t,xt,n,xn,'o')
- grid on;
- %n=(-1:0000000.1:1); yn=n; x=(ceil((1-eps)*yn)-.5; qe=yn-x; plot(n,yn,n,x,'r.'); grid on;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement