quadcof.m 680 B

12345678910111213141516171819202122232425262728
  1. function [A,sumV] = quadcof(N,NW,order)
  2. % Helper function to calculate the nonstationary quadratic inverse matrix
  3. % Usage: [A,sumV] = quadcof(N,NW,order)
  4. % N (number of samples)
  5. % NW: Time bandwidth product
  6. % order: order (number of coefficients, upto 4NW)
  7. %
  8. % Outputs:
  9. %
  10. % A: quadratic inverse coefficient matrix
  11. % sumV: sum of the quadratic inverse eigenvectors
  12. A = zeros(2*NW,2*NW,order);
  13. V = quadinv(N,NW);
  14. [P,alpha] = dpss(N,NW,'calc');
  15. for ii = 1:order
  16. for jj = 1:2*NW
  17. for kk = 1:2*NW
  18. A(jj,kk,ii) = sqrt(alpha(jj)*alpha(kk))*...
  19. sum(P(:,jj).*P(:,kk).*V(:,ii));
  20. end;
  21. end;
  22. end;
  23. sumV=sum(V)/N;