try with this : deff('[x]=foo(y)','x=(y>0)*1; x=x+(1-x)*(-1)')<br>stf<br><br><div class="gmail_quote">2008/11/2 Klaus Pieper <span dir="ltr"><<a href="mailto:kfpieper@web.de">kfpieper@web.de</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
Trying out the example from from <a href="http://www.scilab.org/doc/intro/node25.html" target="_blank">http://www.scilab.org/doc/intro/node25.html</a><br>
<br>
-->deff('[x]=foo(y)','if y>0 then, x=1; else, x=-1; end')<br>
-->x=-1:0.1:1<br>
-->plot(x,foo(x))<br>
<br>
I would expect the graph of a step function jumping from -1 to 1 at 0. Instead I get a constant function y == -1 for -1 <= x <= 1.<br>
<br>
What's going wrong?<br><font color="#888888">
<br>
Klaus<br>
</font></blockquote></div><br>