Graph error with Periodogram, incorrect plotting

조회 수: 1 (최근 30일)
Mini Me
Mini Me 2014년 5월 20일
댓글: dpb 2014년 5월 21일
I have this portion of code, my goal is to have my data go from 1200 x 1 to 300 by 4 and then reshape back into a []x 1 matrix. my problem is when i change the matrix to 300 x 4 then take the periodogram...since my Fs is 5, w for each column is now 0 to 2.5 hz which is fine for a 300 x4 matrix. when i make everything back to [] x 1 matrix, since size of w is 300 x4 it keeps repeating 0 to 2.5 4 times. i want the value for w to be continuous since my FS is 5 for the whole data. the periodogram give me four diff graphs instead of one. here's my code. Help
New_Pxx=[];
New_w=[];
test=Downsampled_data(:);
New_array=reshape(test,(length(test)/length(timerArray)),length(timerArray));
for i=1:4
Fs=5;
[Pxx w]=periodogram(test,[],'onesided',[],Fs);
New_Pxx=[New_Pxx;Pxx];
New_w=[New_w;w]
end
loglog(New_w,New_Pxx);
  댓글 수: 10
Mini Me
Mini Me 2014년 5월 21일
never mind i fix the problem....Thank you for responding...
dpb
dpb 2014년 5월 21일
And the problem fix was????

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by