Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N=20;
- for k=1:1
- for n=1:N
- A(1,n)=sqrt(1/N)*cos((pi*k/N)*(n+0.5));
- end
- end
- for k=2:N
- for n=1:N
- A(k,n)=sqrt(2/N)*cos(pi*k/N*(n+0.5));
- end
- end
- S=inv(A);
- S*A
- x=randn(1,N);
- X=A*x';
- xs=S*X;
- hold on;
- plot(xs,'r');
- plot(x','g');
- plot(xs-x','b');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement