06-11-2014 11:59 AM
Hi All,
I'm hoping someone out there can satisfy my curiosity. I have been porting over some code from Matlab to LabVIEW and came accross a difference in the two implementations of the Hann function. Essentially:
LabVIEW has array length = n
http://zone.ni.com/reference/en-XX/help/371361J-01/lvanls/hanning_window/
Matlab has array length -1 = N.
http://www.mathworks.co.uk/help/signal/ref/hann.html
(where n= N in the two implementations)
As I'm not very clued up on signal processing I was hoping someone could explain why there is a difference in implementation and why array length was chosen for the LabVIEW implementation. According to wolfram the parameter a is full width at half maximum:
http://mathworld.wolfram.com/HanningFunction.html
http://mathworld.wolfram.com/FullWidthatHalfMaximum.html
Is the difference just due to the interpretation of what this value should be?
I've attached a modified version of the window comparison example to illustrate the diference.
Thanks,
06-11-2014 12:27 PM
@^N wrote:
LabVIEW has array length = n
Matlab has array length -1 = N.
Could part o the confusion be due to the fact that LabVIEW arrays start with index zero and matlab arrays start with index one?
I'll look at your code later...
06-11-2014 12:34 PM
It did cross my mind but I validated the LabVIEW code for the Matlab Hann, alsoo it states in the Matlab documentation the window is over 0<= n 0<= N, so I don't think it's an indexing difference unless I'm missing something