help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with function 'resample'


From: Dmitri A. Sergatskov
Subject: Re: Problems with function 'resample'
Date: Mon, 10 Jun 2013 21:25:38 -0500




On Mon, Jun 10, 2013 at 8:06 PM, Terry Duell <address@hidden> wrote:
Hello All,
I'm not sure if this is due to my use of 'resample', or a bug.
I have a signal (acc) , sampled at 2438.095535 Hz (variable Fs).
I would like to resample to 200 Hz, and use the following...

[newacc,h] = resample(acc, 200, uint32(Fs));
and get the following error message...
warning: division by zero
error: resample: product: nonconformant arguments (op1 is 65535x1, op2 is 65536x1)
error: called from:
error:   /home/terry/octave/signal-1.2.2/resample.m at line 82, column 6

So thinking it might be an issue with difference between the real and integer sample rates, I try...

[newacc,h] = resample(acc, 200000000, 2438095535);
and get the following error message...
warning: division by zero
error: invalid range
error: called from:
error:   /home/terry/octave/signal-1.2.2/resample.m at line 66, column 6

Is there a correct way to resample my signal to 200 Hz, or do we have a bug?

I think we have a bug. 'p' and 'q' in resample should be integer numbers (less than intmax) but represented
by doubles.
E.g.
[newacc,h] = resample(acc, 2000, 24381);
should work.


Regards,

Dmitri.
--


reply via email to

[Prev in Thread] Current Thread [Next in Thread]