<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Reading the lsq_splin function help, should help in this case:<o:p></o:p></p>
<p class="MsoNormal">The error “There are not enough points to adjust” is due to the fact that the 3rd input to lsq_splin (‘x’ the list of breakpoints of the cubic spline) has values all lying outside the input vt12 variable range (39.49 to 155.62).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From:</b> users <users-bounces@lists.scilab.org> <b>On Behalf Of
</b>Daniel Stringari<br>
<b>Sent:</b> Saturday, April 11, 2020 3:06 AM<br>
<b>To:</b> Users mailing list for Scilab <users@lists.scilab.org><br>
<b>Subject:</b> Re: [Scilab-users] spline and color plot on the chart<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Federico,<br>
<br>
I appreciate the help. Below is a list of the code on which I try to plot the data with Isq_splin:<br>
<br>
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<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
but I'm getting the error: lsq_plin: There are not enough points to adjust.<br>
<br>
Does anyone understand what could be wrong?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>