tomleslie

13821 Reputation

20 Badges

14 years, 205 days

MaplePrimes Activity


These are Posts that have been published by tomleslie

The DFT windowing functions in the SignalProcessing package seem to be inconsistent in the type of data they will accept, and the type they return.

BartlettHannWindow,  BlackmanHarrisWindow, BlackmanNuttallWindow,   BohmanWindow, CauchyWindow, CosineWindow, ExponentialWindow, FlatTopWindow,  GaussianWindow, HannPoissonWindow, ParzenWindow, PoissonWindow,  RectangleWindow, ReiszWindow, RiemannWindow, TaperedCosineWindow, TriangleWindow, TukeyWindow

accept Arrays, containing almost any data type (haven't tried them all!) as input. and always return a Vector[row].

But

BartlettWindow, BlackmanWindow, HammingWindow, HannWindow, KaiserWindow

require that the option datatype=float[8] be set in the Array() constructor, which is used as input and always return an hfarray.

Thus, for example

with(SignalProcessing);
sig:= Array( -50..50,
                        fill=1
                    ):
BartlettHannWindow(sig); # this works
BartlettWindow(sig);# this fails with datatype unsupported error

Very confusing!!!!

Page 1 of 1