[Scilab-users] Puzzling behaviour ignoring 'Invalid index' error

Adrien Vogt-Schilb vogt at centre-cired.fr
Fri Jan 18 14:24:12 CET 2013


Hi

can you rpovide the full code that makes the bug ?

in your example, for instance, t_z is not defined

On 18/01/2013 05:11, AntonSeab wrote:
> Hi,
>
> I'm finding the following behaviour puzzling. When running the following
> code that has one typing error 'lambda(t-t_z)' instead of 'lambda*(t-t_z)':
>
> lambda = -0.9;
> function exch=e(t,t_z)
>          exch = exp(lambda(t-t_z));
> endfunction
> e(4.999,3)
>
> we get unexpectedly:
>
> -->e(4.999,3)
>   ans  =
>   
>      0.4065697
>
> This problem happens for other values t < 5. But for e(5.000,3), or other
> values t > 5, we get as expected an error message:
>
> -->e(5.000,3)
>
>   !--error 21
> Invalid index.
> at line       2 of function e called by :
> e(5.000,3)
> at line       7 of exec file called by :
> exec('C:\Users\Anton\AppData\Local\Temp\SCI_TMP_5144_\LOAD_INTO_SCILAB-6477721663385113459.sce',
> 1)
> while executing a callback
>
>
>
>
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/Puzzling-behaviour-ignoring-Invalid-index-error-tp4025701.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20130118/6d6e93ba/attachment.htm>


More information about the users mailing list