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?
已解决! 转到解答。
The feedback forum is not for tenchical questions. I try to have this moved to the LabVIEW forum (since you mention LabVIEW).
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)
I thought this was.. yoou have the direct link?
Then how would I take the sum(PSD). Since the PSD come in a cluster....
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)
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
Perfect!