bugGNU Octave - Bugs: bug #36385, indexing of sparse matrix by a...

 
 

bug #36385: indexing of sparse matrix by a matrix in 3.2.4

Submitter:  jan pfaler <jan>
Submitted:  Thu 03 May 2012 02:22:38 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  jan Open/Closed:  * Closed
Release:  * 3.2.4 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 03 May 2012 02:44:50 PM UTC, comment #1: 

3.2.4 is an obsolete version of Octave. We no longer support it. The current version of Octave is 3.6.1. I don't see this problem in this version. Please upgrade.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Thu 03 May 2012 02:22:38 PM UTC, original submission:  

Dear Community,

In 3.2.4 indexing of sparse vector using an non-vector array produces a matrix of expected size, but with only first row in indexing matrix being taken into account. Example 1 below is expected to produce equal a and b, but only realizes the first of a.  

For ndx (row or column) vector, the result is fine, as well as for both val and ndx being matrices, see Example 2.


*Example 1


val = 1:10;
ndx = [1:3;7:9],
sval = sparse(val);
a = full(sval(ndx)),
b = val(ndx)




ndx =
   1   2   3
   7   8   9
a =
   7   8   9
   0   0   0
b =
   1   2   3
   7   8   9


*Example 2


ndx = [1:3;7:9],
val = [1:10;11:20]';
sval = sparse(val);
a = full(sval(ndx)),
b = val(ndx)



ndx =
   1   2   3
   7   8   9
a =
   1   2   3
   7   8   9
b =
   1   2   3
   7   8   9



Best Regards,
jan

jan pfaler <jan>

 

(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 jordigh (Posted a comment)
  • -email is unavailable- added by jan (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
    2012-05-03 jordigh StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code