This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % (iv) V = [cos(2*pi*f0_hat*n) -sin(2*pi*f0_hat*n)] c = (V'*V)\(V'*x) z = [1 j]*c A_hat = abs(z) phi_hat = angle(z) A_error = abs((A - A_hat)/A) phi_error = abs((phi - phi_hat)/(2*pi)) Since f0 is in the range [0,1) and phi is in the range [0,2*pi), it is appropriate to normalize the errors by 1 and 2*pi (resp.). In the case of A, which is a random positive number, it is better to use the relative error (i.e, normalize by the true value of A)....
View Full Document
This note was uploaded on 03/21/2010 for the course ENEE 241 taught by Professor Staff during the Spring '08 term at Maryland.
- Spring '08