取消
顯示結果 
搜尋替代 
您的意思是: 

how to take the sum of an a cluster

已解決!
前往解決方案

Hey Im trying to convert a matlab code into labview and i came across this issue with clusters. can anybody help?

  let's say:

[Pxx,w]=periodogram (mydata, [],[],var]

     time=sum(mydata.^2)/length(mydata)

     freq=sum(Pxx)

     Pxx=Pxx*time/freq

     Pxx=sqrt(Pxx)

     loglog(w,Pxx)

 

I manage to do the PSD of mydata, and translate time into labview code..

     but how do I take the sum of Pxx which is clearly going to be a cluster of 3 elements (magnitude, df, f0).. help?

0 積分
1 條訊息(共 9 條)
5,042 檢視

The feedback forum is not for tenchical questions. I try to have this moved to the LabVIEW forum (since you mention LabVIEW).

0 積分
2 條訊息(共 9 條)
5,036 檢視

I'd just run the waveform through FFT Power Spectrum and PSD VI found on the waveform measurements vis palatte.  (LabVIEW uses a default Hanning window so to match Matlab make sure you wire a "Rectangle" to the window input)


"Should be" isn't "Is" -Jay
0 積分
3 條訊息(共 9 條)
5,010 檢視

I thought this was.. yoou have the direct link?

0 積分
4 條訊息(共 9 條)
4,995 檢視

Then how would I take the sum(PSD). Since the PSD come in a cluster....

0 積分
5 條訊息(共 9 條)
4,991 檢視

Sure, Right Here

 

Export mode changes the output between PSD (Matlab Pxx = periodogram(x,window)) and Power Spectrum.  Esentiall the same as:

 Pxx = periodogram(x,window,power)

 

beyond that "summing" f0, df and an array of magitudes is adding apples to a bag of carrots what measurement are you expecting? (My Matlab is a bit rusty)


"Should be" isn't "Is" -Jay
0 積分
6 條訊息(共 9 條)
4,983 檢視
解決方案
由主題作者所接受 ritch_by_nature

My point exactly! so i decided to unbundle the Psd and do the sum of the magnitude array elements. then rebundle it with the f. and dt... not sure if that will work

0 積分
7 條訊息(共 9 條)
4,966 檢視

You probably want something more like this:

!1.png

 

but thats a guess... 

 


"Should be" isn't "Is" -Jay
0 積分
8 條訊息(共 9 條)
4,952 檢視

Perfect!

0 積分
9 條訊息(共 9 條)
4,928 檢視