Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- clear
- clc
- xdel(winsid());
- x=linspace(0,20*%pi,50);
- y=cos(2*%pi*x/16);
- subplot(2,1,1)
- plot(x,y)
- xtitle('Funkcja cosinus')
- X=fft(y,-1);
- subplot(2,1,2)
- plot2d3(x,real(X))
- plot(x,real(X), 'ro');
- xtitle('FFT funkcji cosinus')
- */
- /*
- clear
- clc
- xdel(winsid());
- n=0:10;
- a=n+1;
- x=a.*sin(2*%pi*n/10);
- X=fft(x);
- plot(a,x)
- figure
- plot2d3(n,real(X))
- plot(n,real(X),'ro')
- a = gca () ;
- a.x_location ="origin";
- a.y_location ="left";
- */
- clear
- clc
- xdel(winsid());
- n=0:15;
- a=0.3;
- w=5:0.5:12.5;
- x=a.*sin(w.*%pi.*n/16);
- X=fft(x);
- plot(n,x)
- figure
- plot2d3(n,real(X))
- plot(n,real(X),'ro')
- a = gca () ;
- a.x_location ="origin";
- a.y_location ="left";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement