[Scilab-users] sparse in Scilab 6.0.0
Stéphane Mottelet
stephane.mottelet at utc.fr
Sat Jul 8 19:47:50 CEST 2017
Please read the Matlab's help page for sparse at
https://fr.mathworks.com/help/matlab/ref/sparse.html :
S = sparse(i,j,v) generates a sparse matrix S from the triplets i, j,
and v such that S(i(k),j(k)) = v(k). The max(i)-by-max(j) output matrix
has space allotted for length(v) nonzero elements._*sparse adds together
elements in v that have duplicate subscripts in i and j.*__*
*_
Scilab devs have always wanted to have no strings attached to Matlab
conventions. Sometimes this has been a good idea, but here this is
definitely not the case...
S.
Le 08/07/2017 à 19:09, Samuel Gougeon a écrit :
> Hi,
>
> Le 08/07/2017 à 10:00, Pinçon Bruno a écrit :
>> Le 08/07/2017 à 04:13, Taiji HAGIWARA a écrit :
>>> 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?
>>
>> Hi all,
>>
>> If it is the case, it's for sure a very bad idea : the sum feature
>> of the sparse function is used to build finite element matrices
>> fastly
>> in those softwares (matlab like). At least the usual behavior
>> could be
>> changed by an additionnal option parameter (with the default set to
>> get the old behavior).
>
> From a general non-sparse and non-finite-element point of view, this
> feature looks like a hack.
> Now, it has never been documented in Scilab. Then, it was considered
> and reported as a bug
> @ http://bugzilla.scilab.org/7675
> If apparently it needs to be restored, it clearly needs to be
> documented, and actually asks
> for an option. Could you -- Bruno and Stephane -- comment the report
> please?
>
> Thanks.
> Samuel
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170708/d91d90e8/attachment.htm>
More information about the users
mailing list