<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Okay, here's my  complaint:<br><br><br>I write this code:<br><div style="margin-left: 160px;">"<br>clear;<br> <br>function [x,y]=myfct(a,b)<br>x=a+b<br>y=a-b<br>endfunction<br><br>[x,y]=myfct(3,2)<br><br>//////////////////////////////////<br><br>for k = 1:21 do<br><br>  function [x,y]=myfct2(a,b)<br>      x=a+b<br>      y=a-b<br>  endfunction<br><br>  [u,v] = myfct2(k, k+1)<br>  <br>end<br>"<br></div><br>And I get this result:<br><div style="margin-left: 160px;">"<br>y  =<br><br>    1.<br> x  =<br><br>    5.<br>=a-b<br> !--error 2<br>invalid factor<br>at line       3 of function myfct2 called by :<br> 
 endfunction<br>line    20 of exec file called by :<br>exec("S:/Depannage.sci");<br>in  execstr instruction    called by : <br>"<br></div><br>In other words, defining functions with more than one return variables inside loops<br>does not work.<br>By the way, what (in the *#!ยง^$) does 'invalid factor' mean ?<br><br><br>Also, I'm really mad about this, because if I write<br><br><div style="margin-left: 160px;">"<br>for k = 1:21 do<br><br>  function y=myfct3(a,b)<br>      y=a-b<br>  endfunction<br><br>  u = myfct3(k, k+1)<br>  <br>end<br>"<br></div><div style="margin-left: 120px;"><br></div>this works perfectly well. So I expected it to work for the above too !<br><br>So, is there a way to circumvent this ?<br><br>Thanks in advance<br><br>Teodor<br></div></div><br>
      

      <hr size="1"> 
Ne gardez plus qu'une seule adresse mail ! <a href="http://fr.rd.yahoo.com/mail/mail_taglines/trueswitch/*http://www.trueswitch.com/yahoo-fr/">Copiez vos mails</a> vers Yahoo! Mail </body></html>