<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Please read the Matlab's help page for sparse at
<a class="moz-txt-link-freetext" href="https://fr.mathworks.com/help/matlab/ref/sparse.html">https://fr.mathworks.com/help/matlab/ref/sparse.html</a> :<br>
</p>
<p>
<meta charset="utf-8">
</p>
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.<u><b>
sparse adds together elements in v that have duplicate
subscripts in i and j.</b></u><u><b><br>
</b></u><br>
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... <br>
<br>
S.<br>
<br>
<div class="moz-cite-prefix">Le 08/07/2017 à 19:09, Samuel Gougeon a
écrit :<br>
</div>
<blockquote cite="mid:44a22df0-17b0-e1bf-d36e-158301284d5f@free.fr"
type="cite">Hi,
<br>
<br>
Le 08/07/2017 à 10:00, Pinçon Bruno a écrit :
<br>
<blockquote type="cite">Le 08/07/2017 à 04:13, Taiji HAGIWARA a
écrit :
<br>
<blockquote type="cite">Dear all,
<br>
<br>
I have a question on "sparse" function in ver.6.0.0
<br>
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)
<br>
<br>
When we set same (i,j) factor twice or more,
<br>
ie.
<br>
ij=[i1,j1;
<br>
i1,j1]
<br>
v=[a1;
<br>
a2]
<br>
<br>
Scilab 5.5.2 used to return the sum of corresponding value,
a1+a2.
<br>
But Scilab 6.0.0 now returns the last entry, a2.
<br>
<br>
Is it a bug?
<br>
Otherwise, is it a intended revision?
<br>
</blockquote>
<br>
Hi all,
<br>
<br>
If it is the case, it's for sure a very bad idea : the sum
feature
<br>
of the sparse function is used to build finite element
matrices fastly
<br>
in those softwares (matlab like). At least the usual behavior
could be
<br>
changed by an additionnal option parameter (with the default
set to
<br>
get the old behavior).
<br>
</blockquote>
<br>
From a general non-sparse and non-finite-element point of view,
this feature looks like a hack.
<br>
Now, it has never been documented in Scilab. Then, it was
considered and reported as a bug
<br>
@ <a class="moz-txt-link-freetext" href="http://bugzilla.scilab.org/7675">http://bugzilla.scilab.org/7675</a>
<br>
If apparently it needs to be restored, it clearly needs to be
documented, and actually asks
<br>
for an option. Could you -- Bruno and Stephane -- comment the
report please?
<br>
<br>
Thanks.
<br>
Samuel
<br>
<br>
_______________________________________________
<br>
users mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
<br>
</blockquote>
<br>
</body>
</html>