<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 06/10/2014 04:57 PM, Luis Rodrigues
wrote:<br>
</div>
<blockquote
cite="mid:CAD8fa63mBgd6Yo_Ckw280nQ4afavyV1xM965NUs9HR6tE4bTnQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>Hi all,<br>
<br>
I'm using a cubic spline to calibrate a sensor, the code
in scilab is as follows. <br>
<br>
n=10;<br>
x=linspace(min(dists(:,1)), max(dists(:,1)), n);<br>
[y, d] = lsq_splin(dists(:,1), dists(:,2), x);<br>
ys = interp(dists(:,1), x, y, d,'natural');<br>
<br>
<br>
</div>
I would like to store x, y, d in an eeprom and calculate the
calibrated value (basically running interp)<br>
</div>
Could someone please tell me where I can find the
implementation of interp so that I can implement it in
Arduino?<br>
</div>
</div>
</blockquote>
<br>
I think the source code is here:<br>
<br>
<a class="moz-txt-link-freetext" href="http://doxygen.scilab.org/master/d7/d3b/sci__interp_8c.html">http://doxygen.scilab.org/master/d7/d3b/sci__interp_8c.html</a><br>
<br>
Hope it helps,<br>
<br>
Antoine<br>
<blockquote
cite="mid:CAD8fa63mBgd6Yo_Ckw280nQ4afavyV1xM965NUs9HR6tE4bTnQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<br>
</div>
Best regards,<br>
Luis<br>
<div>
<div><br clear="all">
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Antoine Monmayrant LAAS - CNRS
7 avenue du Colonel Roche
BP 54200
31031 TOULOUSE Cedex 4
FRANCE
Tel:+33 5 61 33 64 59
email : <a class="moz-txt-link-abbreviated" href="mailto:antoine.monmayrant@laas.fr">antoine.monmayrant@laas.fr</a>
permanent email : <a class="moz-txt-link-abbreviated" href="mailto:antoine.monmayrant@polytechnique.org">antoine.monmayrant@polytechnique.org</a>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
</pre>
</body>
</html>