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 Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 4.2.1 Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


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>
Project 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.';

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:

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 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 project members can vote.





    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    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.9