I have a list of numbers data of length 10^7. I have values
rate = 100000.;
cutoff = 2000.;
I try to low pass filter with
LowpassFilter[data
, Quantity[cutoff, "Hz"]
, SampleRate -> Quantity[rate, "Hz"]]
I get the error message:
LowpassFilter::srate: The value of sample rate should be a positive machine-sized integer number or a Quantity representing frequency instead of $Failed.
But if I replace rate with its value, it works fine.
LowpassFilter[data, Quantity[cutoff, "Hz"],
SampleRate -> Quantity[100000., "Hz"]]
Why is that, and is there a workaround?