取消
显示结果 
搜索替代 
您的意思是: 

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,032 次查看

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,026 次查看

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,000 次查看

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

0 项奖励
4 条消息(共 9 条)
4,985 次查看

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

0 项奖励
5 条消息(共 9 条)
4,981 次查看

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,973 次查看
解答
接受人 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,956 次查看

You probably want something more like this:

!1.png

 

but thats a guess... 

 


"Should be" isn't "Is" -Jay
0 项奖励
8 条消息(共 9 条)
4,942 次查看

Perfect!

0 项奖励
9 条消息(共 9 条)
4,918 次查看