Advertisement
szymcio93

zad1

Oct 13th, 2015
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1.  
  2. N=20;
  3. for k=1:1
  4. for n=1:N
  5. A(1,n)=sqrt(1/N)*cos((pi*k/N)*(n+0.5));
  6. end
  7. end
  8. for k=2:N
  9. for n=1:N
  10. A(k,n)=sqrt(2/N)*cos(pi*k/N*(n+0.5));
  11. end
  12. end
  13. orto=zeros(20,20);
  14. for i=1:N
  15. for j=1:N
  16. z=A(i,:).*A(j,:);
  17. orto(i,j)=sum(z);
  18. end
  19. end
  20. orto
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement