Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A=randn(20);
- %zepsute DCT
- N=20;
- for k=1:1
- for n=1:N
- AA(1,n)=sqrt(1/N)*cos((pi*(k+0.25)/N)*(n+0.5));
- end
- end
- for k=2:N
- for n=1:N
- AA(k,n)=sqrt(2/N)*cos(pi*(k+0.25)/N*(n+0.5));
- end
- end
- %
- orto=zeros(N,N);
- for i=1:N
- for j=1:N
- z=A(i,:).*A(j,:);
- orto(i,j)=sum(z);
- end
- end
- orto
- S=inv(A);
- A*S
- x=randn(1,20);
- 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