bugGNU Octave - Bugs: bug #51560, [octave forge] (communications)...

 
 

bug #51560: [octave forge] (communications) Wrong dimension in pskmod.m output

Submitter:  Roland Baudin <roland65>
Submitted:  Mon 24 Jul 2017 03:05:49 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Patch Submitted Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 4.2.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 01 Jan 2023 03:50:18 PM UTC, comment #6: 
Nir Krakauer <nir_krakauer>
Wed 14 Dec 2022 03:45:50 PM UTC, comment #5: 

v3 patch attached with a minor change. still passes tests.

(file #54092)

Nicholas Jankowski <nrjank>
Group Member
Wed 14 Dec 2022 03:34:51 PM UTC, comment #4: 

ok.  fixing the issue was simply a matter of changing the check from a size check to an iscolumn check. I added a number of tests to cover 1d - 3d, and all looks good.

marking as patch Submitted and copying package maintainer.

(file #54091)

Nicholas Jankowski <nrjank>
Group Member
Wed 14 Dec 2022 02:25:00 PM UTC, comment #3: 

no, I honestly just pasted the original report's if statement into pskmod and ran it.  I just redid that change and added a single test based on the size of the code in the original comment, but as per my earlier comment it's not quite a complete fix.  patch attached for someone else to build on.



(file #54090)

Nicholas Jankowski <nrjank>
Group Member
Wed 14 Dec 2022 09:46:31 AM UTC, comment #2: 

nrjank,

Is there a patch for the work you did?

Anonymous
Wed 02 Aug 2017 09:14:55 PM UTC, comment #1: 

no files attached?

I did try the fix and it works fine for both vector and matrix input for d.  It does throw an error for nD vectors where transpose is not defined. matlab's pskmod is odd though for ndim>2. (the help only specifies vectors and matrices so  I guess that's fair.)  for a 10x1x2 input, the output is 10x1x2.  But for a 1x10x2 input, the output gets concatenated to 20x1. I'm thinking venturing into undocumented matlab there negates the need for compatibility, but it might be nice if Octave's version was consistent for nD>2...

Nicholas Jankowski <nrjank>
Group Member
Mon 24 Jul 2017 03:05:49 PM UTC, original submission:  

The dimensions of the pskmod output matrix should be the same as the input. This is not true when the input is a column vector. Then the output is a line vector.

Example to reproduce the bug:

d = randint (10, 1, 4); % d is 10 x 1
y = pskmod (d, 4, pi/4); % y is 1 x 10 instead of 10 x 1

To fix the issue, I simply added the lines:

if (size(x,2) == 1)
  y = y.';
end

just before the endfunction line in the pskmod.m code.

The fixed function is attached.

Roland Baudin <roland65>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #54092:  pskmod_output_orientation_bug51560_v3.patch added by nrjank (2KiB - application/octet-stream - final(!) patch)
file #54091:  pskmod_output_orientation_bug51560_v2.patch added by nrjank (2KiB - application/octet-stream - final(?) patch)
file #54090:  pskmod_output_orientation_bug51560_v1.patch added by nrjank (828B - application/octet-stream - preliminary patch implementing comment #0 suggested change with a single test)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nir_krakauer (Posted a comment)
  • -email is unavailable- added by nrjank
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by roland65 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-12-14 nrjank Attached File- Added pskmod_output_orientation_bug51560_v3.patch, #54092
    2022-12-14 nrjank Attached File- Added pskmod_output_orientation_bug51560_v2.patch, #54091
        StatusNone Patch Submitted
        Carbon-Copy- Added nir_krakauer
    2022-12-14 nrjank Attached File- Added pskmod_output_orientation_bug51560_v1.patch, #54090
    2018-07-02 jwe Summary[octave-forge] (communications) Wrong dimension in pskmod.m output [octave forge] (communications) Wrong dimension in pskmod.m output
    2017-08-12 jwe SummaryWrong dimension in pskmod.m output (communications package) [octave-forge] (communications) Wrong dimension in pskmod.m output

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code