bugGNU Octave - Bugs: bug #46473, bug in resize

 
 

bug #46473: bug in resize

Submitter:  None
Submitted:  Wed 18 Nov 2015 03:56:03 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 18 Nov 2015 05:15:04 PM UTC, comment #2: 

Even if it was not confusing the functions, the bug is invalid. That is the intended result. See help text of resize


x = [1:10];
dv = [5 2];
y = zeros (dv, class (x));
sz = min (dv, size (x));
for i = 1:length (sz)
  idx{i} = 1:sz(i);
endfor
y(idx{:}) = x(idx{:});


Carnë Draug <carandraug>
Group Member
Wed 18 Nov 2015 04:26:37 PM UTC, comment #1: 

aren't you confusing reshape and resize functions?

Anonymous
Wed 18 Nov 2015 03:56:03 PM UTC, original submission:  

resize([1:10],5,2)
ans =

   1   2
   0   0
   0   0
   0   0
   0   0


it sould give as result

   1   2
   3   4
   5   6
   7   8
   9   10


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

 

CC list is empty

 

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-11-18 carandraug StatusNone Invalid / Not an Octave Bug
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code