<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div class="" style="">Hi Scilab users,</div><div class="" style=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class="">I have a problem to plot a graph of the trigonometric function, as follows:</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><br class="" style=""></div><pre style="font-family: Monospaced;" class=""><span style="color:rgb(100,174,100);font-style:italic;" class="">// Close all opened figures and clear workspace</span>
<span style="color:rgb(100,174,100);font-style:italic;" class="">//xdel(winsid());</span>
<span style="color:rgb(50,185,185);" class="">clear</span>;
<span style="color:rgb(50,185,185);" class="">clc</span>;
<span style="color:rgb(176,24,19);" class="">function</span> <span style="color:rgb(131,67,16);font-weight:bold;" class="">f</span><span style="color:rgb(92,92,92);" class="">=</span><span style="text-decoration: underline;" class="">myfunction</span><span style="color:rgb(74,85,219);" class="">(</span><span style="color:rgb(131,67,16);font-weight:bold;" class="">x</span><span style="color:rgb(74,85,219);" class="">)</span>
<span style="color:rgb(131,67,16);font-weight:bold;" class="">f</span> <span style="color:rgb(92,92,92);" class="">=</span> <span style="color:rgb(131,67,16);font-weight:bold;" class="">x</span><span style="color:rgb(92,92,92);" class="">*</span><span style="color:rgb(50,185,185);" class="">sin</span><span style="color:rgb(74,85,219);" class="">(</span><span style="color:rgb(131,67,16);font-weight:bold;" class="">x</span><span style="color:rgb(74,85,219);" class="">)</span>
<span style="color:rgb(176,24,19);" class="">endfunction</span>
<span style="color:rgb(100,174,100);font-style:italic;" class="">// Plot</span>
<span style="color:rgb(174,92,176);text-decoration:underline;" class="">scf</span><span style="color:rgb(74,85,219);" class="">(</span><span style="color:rgb(188,143,143);" class="">1</span><span style="color:rgb(74,85,219);" class="">)</span>;
<span style="color:rgb(174,92,176);text-decoration:underline;" class="">clf</span><span style="color:rgb(74,85,219);" class="">(</span><span style="color:rgb(188,143,143);" class="">1</span><span style="color:rgb(74,85,219);" class="">)</span>;
xdata <span style="color:rgb(92,92,92);" class="">=</span> <span style="color:rgb(174,92,176);text-decoration:underline;" class="">linspace</span> <span style="color:rgb(74,85,219);" class="">(</span> <span style="color:rgb(92,92,92);" class="">-</span><span style="color:rgb(188,143,143);" class="">10</span> , <span style="color:rgb(188,143,143);" class="">10</span> , <span style="color:rgb(188,143,143);" class="">100</span> <span style="color:rgb(74,85,219);" class="">)</span>;
ydata <span style="color:rgb(92,92,92);" class="">=</span> <span style="text-decoration: underline;" class="">myfunction</span> <span style="color:rgb(74,85,219);" class="">(</span> xdata <span style="color:rgb(74,85,219);" class="">)</span>;
<span style="color:rgb(174,92,176);text-decoration:underline;" class="">plot</span> <span style="color:rgb(74,85,219);" class="">(</span> xdata , ydata <span style="color:rgb(74,85,219);" class="">)</span>;
<span style="color:rgb(174,92,176);text-decoration:underline;" class="">xlabel</span><span style="color:rgb(74,85,219);" class="">(</span><span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">$-5\le x\le 5$</span><span style="color:rgb(188,143,143);" class="">"</span>,<span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">fontsize</span><span style="color:rgb(188,143,143);" class="">"</span>,<span style="color:rgb(188,143,143);" class="">4</span>,<span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">color</span><span style="color:rgb(188,143,143);" class="">"</span>,<span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">red</span><span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(74,85,219);" class="">)</span>;
<span style="color:rgb(174,92,176);text-decoration:underline;" class="">ylabel</span><span style="color:rgb(74,85,219);" class="">(</span><span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">y = x . sin(x)</span><span style="color:rgb(188,143,143);" class="">"</span>,<span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">fontsize</span><span style="color:rgb(188,143,143);" class="">"</span>,<span style="color:rgb(188,143,143);" class="">4</span>,<span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">color</span><span style="color:rgb(188,143,143);" class="">"</span>,<span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">red</span><span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(74,85,219);" class="">)</span>;
<span style="color:rgb(174,92,176);text-decoration:underline;" class="">title</span><span style="color:rgb(74,85,219);" class="">(</span><span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">Function</span><span style="color:rgb(188,143,143);" class="">"</span>,<span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">red</span><span style="color:rgb(188,143,143);" class="">"</span>,<span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">fontsize</span><span style="color:rgb(188,143,143);" class="">"</span>,<span style="color:rgb(188,143,143);" class="">4</span><span style="color:rgb(74,85,219);" class="">)</span>;
<span style="color:rgb(174,92,176);text-decoration:underline;" class="">legend</span><span style="color:rgb(74,85,219);" class="">(</span><span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(188,143,143);" class="">Function evaluation</span><span style="color:rgb(188,143,143);" class="">"</span><span style="color:rgb(74,85,219);" class="">)</span>;</pre><pre class=""><font face="HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif"><span style="white-space: normal;">Could someone tell me what's wrong?</span></font></pre><pre class=""><font face="HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif"><span style="white-space: normal;">Thank you in advance.</span></font></pre><pre class=""><font face="HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif"><span style="white-space: normal;">All best,</span></font></pre><pre class=""><font face="HelveticaNeue, Helvetica
Neue, Helvetica, Arial, Lucida Grande, sans-serif"><span style="white-space: normal;">Reinaldo.</span></font></pre></div></body></html>