<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19298"></HEAD>
<BODY>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 face=Arial>Hi 
Paul,</FONT></SPAN></DIV>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 
face=Arial>Assuming the relationship between x, y and T is approximately linear, 
then you can just match the points on the curves pairwise and interpolate 
between the pairs using interpln.  If your target temperature T is such 
that T = aT1 + (1-a)T2, then it will produce a point at abscissa x = ax1 + 
(1-a)x2 and ordinate y = ay1 + (1-a)y2, where (x1,y1) and (x2,y2) are one of the 
pairs of points.  You can build up the two x and y vectors and plot using 
plot2d.</FONT></SPAN></DIV>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 face=Arial>This 
is usually only useful between your two temperatures (interpolation) and is of 
limited accuracy outside (extrapolation), but that 
depends...</FONT></SPAN></DIV>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 face=Arial>If you 
need to get the result on a defined abscissa grid, then you can interpolate in 
the x and y directions separately, noting that sometimes it makes a difference 
which order you do this in.  Depending on the spacing of your x points, a 
linear interpolation in the x direction may not be accurate enough.  In 
that case, I would use for example a Lagrange interpolation.</FONT></SPAN></DIV>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 
face=Arial>HTH,</FONT></SPAN></DIV>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 
face=Arial>Mike.</FONT></SPAN></DIV>
<DIV><SPAN class=884110509-17092012><FONT color=#0000ff size=2 
face=Arial></FONT></SPAN> </DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr>
  <DIV dir=ltr class=OutlookMessageHeader align=left><FONT size=2 
  face=Tahoma>-----Original Message-----<BR><B>From:</B> 
  users-bounces@lists.scilab.org [mailto:users-bounces@lists.scilab.org]<B>On 
  Behalf Of </B>Carrico, Paul<BR><B>Sent:</B> 17 September 2012 
  08:54<BR><B>To:</B> users@lists.scilab.org<BR><B>Subject:</B> [Scilab-users] 
  LInear interpolation between 2 curves<BR><BR></FONT></DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 face=Arial>Dear 
  all,</FONT></SPAN></SPAN></DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 
  face=Arial></FONT></SPAN></SPAN> </DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 face=Arial>Is it possible to make 
  a linear interpolation between 2 curves ? note the abscissa are not necessary 
  exactly the same  ...</FONT></SPAN></SPAN></DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 
  face=Arial></FONT></SPAN></SPAN> </DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 face=Arial>In particular terms, 
  I've a curve one at temperature X and another one at température Y and I would 
  like to have (and to plot) temperature at temperature Z in-between X-Y ... 
  (see attachment)</FONT></SPAN></SPAN></DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 
  face=Arial></FONT></SPAN></SPAN> </DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 face=Arial>I had a look in 
  interp, interp1 and interpln but nothing sound useful for me ... Am I wrong 
  ?</FONT></SPAN></SPAN></DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 
  face=Arial></FONT></SPAN></SPAN> </DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 face=Arial>Thanks for any 
  advice</FONT></SPAN></SPAN></DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 
  face=Arial></FONT></SPAN></SPAN> </DIV>
  <DIV><SPAN 
  style="FONT-FAMILY: 'Comic Sans MS'; COLOR: green; FONT-SIZE: 10pt"><SPAN 
  class=711212207-17092012><FONT color=#000000 
  face=Arial>Paul</FONT></SPAN></SPAN></DIV><PRE>--------------------------------------------------------------------------------


Le présent mail et ses pièces jointes sont confidentiels et destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de votre système. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email.

</PRE></BLOCKQUOTE></BODY></HTML>