bugGNU Octave - Bugs: bug #39332, communications package: quantiz...

 
 

bug #39332: communications package: quantiz function gives wrong results with scalar or single value table

Submitted by:  Chris van der Westhuizen <chrisvdw>
Submitted on:  Mon 24 Jun 2013 04:19:16 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: chrisvdwOpen/Closed: Closed
Release: otherOperating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Mon 16 Sep 2013 03:58:25 AM UTC, comment #2:

Both problems mentioned in this bug report have been fixed:

https://bitbucket.org/mtmiller/octave-communications/commits/cd4f714721c64d85c969fdeeb2b6a237e25d636b

The fixed script will be part of the next release of the communications package.

Mike Miller <mtmiller>
Project Member
Mon 24 Jun 2013 07:00:56 PM UTC, comment #1:

Thanks for your bug report. Confirmed on both counts.

Mike Miller <mtmiller>
Project Member
Mon 24 Jun 2013 04:19:16 PM UTC, original submission:

I am referring to the function in Communications package v. 1.1.1.

Actually I think I found two bugs at the same time, this was by trying to run the DVB-T2 Common Simulation Platform (Sourceforge), where they used the function like this:

rxData = ~(quantiz(rxData,0));

The intention is to get logical 0's and 1's.

Bug #1:

Try this

octave-3.6.4> quantiz([-Inf -Inf Inf Inf -Inf Inf -Inf Inf], 0)
ans =

1
1
0
0
1
0
1
0

The 1's and 0's are inverted. For -Inf, refer to the first bullet point in Mathworks online description. The answer should be a 0. Note that in partition(x), x refers to the Matlab 1-based indices of the table, not the 0-based return values.
I think for n=1, the second bullet point never applies. For Inf, we should look at the 3rd bullet point, where sig > partition(n).

I agree using the function with length 1 table is not a very rational thing to do, but this is the code I found! I am fully willing to help test it, if possible.

Bug #2:

In the above the input is a row, the output should also be a row. (If the input is a column, the output should be a column.)

Chris van der Westhuizen <chrisvdw>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by chrisvdw (Submitted the item)
  • -unavailable- added by chrisvdw
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Sep 2013 03:58:25 AM UTCmtmillerStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Mon 24 Jun 2013 07:00:56 PM UTCmtmillerStatusNone=>Confirmed
      Release3.6.4=>other
      Operating SystemMicrosoft Windows=>Any
      Summaryquantiz function gives wrong results with scalar or single value table=>communications package: quantiz function gives wrong results with scalar or single value table
    Mon 24 Jun 2013 04:19:16 PM UTCchrisvdwCarbon-Copy-=>Added chrisvdw

    Back to the top


    Powered by Savane 3.1-cleanup