• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Periodogram help in Matlab

darthsidious

Senior member
I'm attempting to implement my own periodogram function in matlab (for a project), to estimate the PSD of a discrete signal of length 2048 given to me. I noticed something interesting with Matlab's Periodogram function. When I call [Pxx w] = periodogram(v1), there is something funny with Pxx. According to the formula for calculating a periodogram, Pxx(1) (the sample at freq w =0) should be given by (abs(sum(v1)).^2)/2048 (I wrote this in matlab notation, the formula can be found in any spectral analysis book). But that isn't the case. The function I wrote matches the value.

Does this mean matlab's periodogram function is wrong (which I don't think is the case). So what could be reasons for this mismatch? Spectral Analysis gurus please help....

 
I don't know anything about spectral analysis, but if you type ''edit periodogram'' at the command prompt, it'll bring up MATLAB's implementation. Within periodogram there are more calls to other functions like ''computepsd''... so you can type "edit computepsd" into the prompt as well to bring up the code for that guy. MATLAB has a lot of user-viewable functions, and this stuff seems to be part of that.

If you can't find something, try using MATLAB's internal !grep command or Windows search.
 
eeh, too much work 😉

Originally posted by: eLiu
I don't know anything about spectral analysis, but if you type ''edit periodogram'' at the command prompt, it'll bring up MATLAB's implementation. Within periodogram there are more calls to other functions like ''computepsd''... so you can type "edit computepsd" into the prompt as well to bring up the code for that guy. MATLAB has a lot of user-viewable functions, and this stuff seems to be part of that.

If you can't find something, try using MATLAB's internal !grep command or Windows search.

 
Back
Top