[Scilab-users] sparse in Scilab 6.0.0

Taiji HAGIWARA hagiwara at econ.kobe-u.ac.jp
Sat Jul 8 04:13:15 CEST 2017


Dear all,

I have a question on "sparse" function in ver.6.0.0
Sparse function in ver.6.0.0 returns different answer compared to 
ver.5.2.2.  I am using Scilab 6.0.0 on Windows 10 (64bit)

When we set same (i,j) factor twice or more,
ie.
ij=[i1,j1;
     i1,j1]
v=[a1;
     a2]

Scilab 5.5.2 used to return the sum of corresponding value, a1+a2.
But Scilab 6.0.0 now returns the last entry, a2.

Is it a bug?
Otherwise, is it a intended revision?

[example]
ij=[1,2;1,2];v =[1;2];sp=sparse(ij,v)

--------------------------
[Scilab 5.5.2]
--------------------------
-->sp=sparse(ij,v)
  sp  =
(    1,    2) sparse matrix
(    1,    2)        3.                      <---1+2

--------------------------
[Scilab 6.6.0]
--------------------------
--> sp=sparse(ij,v)
  sp  =
(  1,  2) sparse matrix
(  1,  2)      2.                            <--- 2 only. 1 is ignored


-- 
萩原泰治
神戸大学経済学研究科
〒657-8501 神戸市灘区六甲台町2-1

Taiji Hagiwara
Professor
Graduate School of Economics
Kobe University
2-1 Rokkodai, Nada, Kobe 657-8501, Japan
tel/fax +81-78-803-6848






More information about the users mailing list