bugGNU Octave - Bugs: bug #53085, [octave forge] (signal): resample...

 
 

bug #53085: [octave forge] (signal): resample function gives no output with some p and q

Submitted by:  None
Submitted on:  Wed 07 Feb 2018 11:11:57 AM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid Assigned to:  None
Originator Name:  Rex Lucas Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.1
Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 11 Feb 2018 07:42:05 PM UTC, comment #5:

Closing this as invalid. With the original sample rate of 44000, the output rates of 2000 and 2200 can be achieved directly by decimation, so this works fine with no filtering. With the output rate of 2100, not an even divisor of 44000, some interpolation is necessary.

Mike Miller <mtmiller>
Project Administrator
Wed 07 Feb 2018 10:13:16 PM UTC, comment #4:

OK - thanks

Rex Lucas <rexl>
Wed 07 Feb 2018 09:54:33 PM UTC, comment #3:

I haven't looked into this too far yet, but at a glance I believe this is because you are trying to resample to a rate that is not an integer divisor of the original rate, and at the same time you are applying an interpolation filter of 1.

I don't think there is a bug here in Octave. I would suggest you post your algorithm and ask for help on the Octave help forum, there is a lot of signal processing and filtering knowledge there (https://lists.gnu.org/mailman/listinfo/help-octave, or http://octave.1599824.n4.nabble.com).

Mike Miller <mtmiller>
Project Administrator
Wed 07 Feb 2018 09:29:11 PM UTC, comment #2:

Hi Mike

Please see attached.

With Fs_new = 2000Hz the output tone is 400Hz (aliased down from 2400Hz due to under-sampling).

With Fs_new = 2200Hz the output tone is 200Hz (aliased down from 2400Hz due to under-sampling).

With Fs_new = 2100Hz the output tone is nothing and should be 300Hz (aliased down from 2400Hz due to under-sampling).

Many thanks

Best Regards....Rex

Rex Lucas <rexl>
Wed 07 Feb 2018 07:37:14 PM UTC, comment #1:

Can you please give a more complete example showing what you have passed to the resample function and what you expect to get from it?

This example works for me:

>> x = rand (1000,1);
>> y = resample (x, 9, 220, 1);
>> size (y)
ans =

   41    1


Mike Miller <mtmiller>
Project Administrator
Wed 07 Feb 2018 11:11:57 AM UTC, original submission:

From: -email is unavailable- [mailto:rexl@users.sourceforge.net]
Sent: 07 February 2018 09:34
To: -email is unavailable-
Cc: -email is unavailable-
Subject: Octave resample.m function

REPLY at https://sourceforge.net/u/rexl/profile/send_message
______________________________________
Hi Juan Pablo
I found that:

signal_sampled = resample(signal, p, q, 1);

with some p and q produces no output. [eg with p = 9, q =220]
Best Regards....Rex

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rexl (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-26 mtmiller Carbon-CopyRemoved 80942 => -
    2018-02-11 mtmiller StatusNeed Info => Invalid
        Open/ClosedOpen => Closed
    2018-02-07 mtmiller StatusNone => Need Info
        Summaryresample function in signal package gives no output with some p and q => [octave forge] (signal): resample function gives no output with some p and q

    Back to the top


    Powered by Savane 3.4