<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <font face="Courier New">Daniel:<br>
      <br>
      I think you meant to include more than 1 point. You seem to have
      confused the dimensions given by function size.<br>
      <br>
      But anyway this doesn't seem to be what I suggested.<br>
      <br>
      You should compute a spline for vt12 vs x (the right x, using b =
      c(2)) and another one for vv12. You don't need in this case to use
      lsq_splin, but in case you want to use it, the third argument has
      usually less points than the other two, for instance <br>
       </font><br>
    [yvt, dvt] = lsq_splin (x, vt12, linspace(a, b, 8))<br>
    <br>
    The output argumnts should be used in interp,as shown in the
    lsq_splin help.<br>
    <br>
    Once you have a smoothed version of vt12_s vs x_s and of vv12_s vs
    x_s you plot vv12_s vs vt12_s <br>
    <br>
    Regards,<br>
    <br>
    Federico Miyara<br>
    <br>
    <br>
    <font face="Courier New"></font><br>
    <div class="moz-cite-prefix">On 10/04/2020 21:05, Daniel Stringari
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAAhV9xXHtS3xA=t89kL_XDA6HVVYN4Bw7vBRWVwBH5sTi5n0ZA@mail.gmail.com">c
      = size (vt12)<br>
      a = 0<br>
      b = c (1) // c (1) = 16<br>
      n = c (1)<br>
      x = linspace (a, b, n)<br>
      [y, d] = lsq_splin (vt12, vv12, x ')<br>
      plot (y, d, 'r')<br>
      xlabel ('Speed (rpm)')<br>
      ylabel ('Torque (Nm)')<br>
      title ('Torque x speed values')<br>
      <br>
      //vt12 = 5350.3 5380.19 5410.08 5439.96 4149.5 4179.35 3756.57
      3602.73 3568.12 3597.85 3681.91 3711.59 6143.24 6172.86 6202.49
      6232.1<br>
      //vv12 = 40.16   39.93   39.71   39.49   69.04   68.54   95.32  
      119.26   140.49   139.32   155.62   154.37   93.27   92.82   92.38
        91.94
      <div><br>
      </div>
    </blockquote>
    <br>
  </body>
</html>