<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">I assumed you forgot the variable "n" in plot(phz) when copy and paste, don't you??<br><br>Otherwise, I can't see why you get the error.. and we dont.<br><br>Julio<br><div><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Gary Nelson <gnelson@quantasonics.com><br><b><span style="font-weight: bold;">To:</span></b> users@lists.scilab.org<br><b><span style="font-weight: bold;">Sent:</span></b> Mon, 19 April, 2010 17:58:19<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [scilab-Users] index error not helpful<br></font><br><base><div>This is what I get. Line 7 is the plot
command.</div><div><br></div><div><br></div><div> plot(phz)</div><div> !--error 21 </div><div>Invalid index.</div><div><br></div><div>at line 7 of exec file called by : </div><div>exec('/test if.sce', -1)</div><div> </div><div> </div><div><div>On Apr 19, 2010, at 6:13 AM, Julio Gonzalez-Saenz wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin: 0px; font-family: arial,helvetica,sans-serif; font-size: 10pt;"><div style="margin: 0px;">I don't either. It plots two graphics one in blue and one in green with 20 points.#<br><br>Julio<br></div><div style="margin: 0px; font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="margin: 0px; font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b><span
class="Apple-converted-space"> </span>Samuel Gougeon <<a rel="nofollow" ymailto="mailto:Samuel.Gougeon@univ-lemans.fr" target="_blank" href="mailto:Samuel.Gougeon@univ-lemans.fr">Samuel.Gougeon@univ-lemans.fr</a>><br><b><span style="font-weight: bold;">To:</span></b><span class="Apple-converted-space"> </span><a rel="nofollow" ymailto="mailto:users@lists.scilab.org" target="_blank" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br><b><span style="font-weight: bold;">Sent:</span></b><span class="Apple-converted-space"> </span>Mon, 19 April, 2010 14:12:13<br><b><span style="font-weight: bold;">Subject:</span></b><span class="Apple-converted-space"> </span>Re: [scilab-Users] index error not helpful<br></font><br>----- Message d'origine -----<br>De : Gary Nelson<br>Date : 19/04/2010 13:43:<br>> What is wrong with this seemingly simple test<br>><br>> clc()<br>> n=[1:20]<br>>
z=exp(%i*2*%pi.*n./10)<br>> phz=atan(imag(z),real(z))<br>> ifq=diff(phz)<br>> ifq=[ifq,ifq($)]<br>> plot(n,phz,n,ifq)<br>><br>> The lengths of all vectors are 20 yet I get an error 21 index error<br>> <span class="Apple-converted-space"> </span><br>I do not get any syntax error. It runs well for me.<br><br></div></div></div><br></div><br class="Apple-interchange-newline"></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><div>Gary Nelson</div><div><a rel="nofollow" ymailto="mailto:gnelson@quantasonics.com" target="_blank" href="mailto:gnelson@quantasonics.com">gnelson@quantasonics.com</a></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></div></div>
</div><br>
</body></html>