<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Le 12/05/2015 11:56, Samuel Gougeon a
écrit :<br>
</div>
<blockquote cite="mid:5551CE68.8000308@free.fr" type="cite">Le
12/05/2015 11:09, Stéphane Mottelet a écrit :
<br>
<blockquote type="cite">Le 12/05/2015 10:30, Samuel Gougeon a
écrit :
<br>
<blockquote type="cite">
<br>
<blockquote type="cite">OK. So, unless i misunderstand you,
this syntax is used only to update values at their current
positions, not to set new positions or modify ones.
<br>
</blockquote>
</blockquote>
exactly !
<br>
</blockquote>
<br>
Stephane,
<br>
Could you report your wish on bugzilla? The patch to do S.nzval=v
is ready. I will post it on your report, with updated help pages.
<br>
</blockquote>
Here is a sample:<br>
<font face="Courier New, Courier, monospace"><br>
-->sp0 = sprand(5,4,0.4); v = grand(1,nnz(sp0),"uin",0,10); sp
= sp0; <br>
<br>
-->sp.nzval = v; <br>
<br>
-->full(sp0), v, full(sp),sp<br>
ans =<br>
<br>
0.3439298 0. 0.0811258 0.9293860 <br>
0. 0.7802274 0.3794188 0. <br>
0.6256186 0. 0. 0.4584969 <br>
0. 0.6692851 0. 0. <br>
0.8157691 0. 0. 0.7757127 <br>
v =<br>
<br>
5. 9. 6. 0. 10. 5. 4. 0. 9. 3. <br>
ans =<br>
<br>
5. 0. 5. 0. <br>
0. 0. 4. 0. <br>
9. 0. 0. 9. <br>
0. 10. 0. 0. <br>
6. 0. 0. 3. <br>
sp =<br>
<br>
( 5, 4) sparse matrix<br>
<br>
( 1, 1) 5. <br>
( 1, 3) 5. <br>
( 2, 3) 4. <br>
( 3, 1) 9. <br>
( 3, 4) 9. <br>
( 4, 2) 10. <br>
( 5, 1) 6. <br>
( 5, 4) 3. <br>
</font><br>
</body>
</html>