bugGNU Octave - Bugs: bug #45680, permute rows or columns

 
 

bug #45680: permute rows or columns

Submitter:  Marco Caliari <caliari>
Submitted:  Mon 03 Aug 2015 02:30:49 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.2 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 06 Aug 2015 07:21:31 AM UTC, comment #6: 

Please close, thanks.

Marco

Marco Caliari <caliari>
Group Member
Wed 05 Aug 2015 02:49:56 PM UTC, comment #5: 

Should I close this report, or do you want to leave it open with a low priority?

Rik <rik5>
Group administrator
Wed 05 Aug 2015 10:32:18 AM UTC, comment #4: 

Hi Rik,

Matlab does not work either. On the other hand, I now agree with you that


permute(A,1)


should leave the matrix unchanged.

Marco

Marco Caliari <caliari>
Group Member
Tue 04 Aug 2015 05:52:43 PM UTC, comment #3: 

The documentation is pretty clear that you need to specify the order of all dimensions of an N-d array.  Since for Octave and Matlab arrays are always at least 2-D the second argument must have a minimum of two entries.

You might check how Matlab handles this.  If they have an exception then we might do it to for Matlab compatibility.  The documentation is at http://www.mathworks.com/help/matlab/ref/permute.html, but doesn't reference any thing like this.

Also, if I was to introduce an exception, I would think that


permute (A, 1)


would leave the matrix unchanged since it is suggested to put the first dimension of the original matrix in the first dimension slot in the result matrix.

Rik <rik5>
Group administrator
Tue 04 Aug 2015 05:25:18 PM UTC, comment #2: 

Dear all,

I wrote a code working in d spatial dimensions and used the command


permute(A,d:-1:1)


where A is a N-d array. When d=1, there is an "invalid call to permute". Why not to define permute(A,1) as A.', when A is a colum or a row?

Thanks,

Marco

Marco Caliari <caliari>
Group Member
Mon 03 Aug 2015 07:56:36 PM UTC, comment #1: 

@Marco, I think you need to re-post your bug report.  It didn't make it into the comment field.

Rik <rik5>
Group administrator
Mon 03 Aug 2015 02:30:49 PM UTC, original submission:  

Dear all,

I wrote a code working in d spatial dimensions and used the command


permute(u,d:-1:1)
-verbatim+

I discovered that permute(u,1) gives an invalid call. Would it be a problem to extend permute in such a way that permute(u,1) gives a column (row) if u is a row (column)?

Thanks,

Marco

Marco Caliari <caliari>
Group Member

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by caliari (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-08-06 rik5 StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code