<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<font face="Courier New">Jean-Ives,<br>
<br>
It seems that the variables are not so huge, xp has 1000000
components as well as z, while x and y have 10000 components. <br>
<br>
But I guess splin() gets the derivatives through solving a linear
equation system of, in this case, 10000 x 10000, and even if the
system's matrix is quasi diagonal (it has only the diagonal,
sub-diagonal and supra-diagonal components different from 0) and
this surely reduces the computational load, it seems quite a large
system and probably it gets stuck here. <br>
<br>
Probably a lighter (and better) way to do what you seem to be
looking for is to try to resample your x-y data by a factor of 100
using intdec(). However, doing that 1000 times may take quite a
long time (I haven't tested it). If you really need that, it would
</font><font face="Courier New">probably </font><font face="Courier
New">be better to do the oversampling algorithm from scratch in
such a way to design only once the smoothing filter instead of
letting intdec() design the same filter over and over again.<br>
<br>
Regards,<br>
<br>
Federico Miyara<br>
<br>
</font><br>
<div class="moz-cite-prefix">On 08/03/2021 04:33, Jean-Yves Baudais
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:87c2fcd8-2ac4-c4c5-43ef-8337ef0ed6a4@insa-rennes.fr">Hello,
<br>
<br>
Is my code wrong or is there a real memory problem with the
function interp in the following code? (Scilab fulfills the memory
and of course stops.)
<br>
<br>
for i=1:1000
<br>
mprintf("%d\n",i);
<br>
n=1e6;
<br>
xp=1:n;
<br>
x=1:100:n;
<br>
y=rand(x);
<br>
d=splin(x,y);
<br>
z=interp(xp,x,y,d);
<br>
end
<br>
<br>
Thanks,
<br>
<br>
Jean-Yves
<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>
<br>
</blockquote>
<br>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /> <table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 18px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Libre de virus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a> </td>
</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>