[Scilab-users] Scilab control after an impossible calculation
paul.carrico at free.fr
paul.carrico at free.fr
Thu Oct 6 12:31:31 CEST 2016
thanks for the advice
well I tried but it does not work as expected ; errcatch seems to be obsolete so I'm testing it with execstr: the warning is not displayed ... why ????
###########################################
mode(0)
try
x = 0;
y = (1/x)
if execstr(('y','errcatch') <> 0) then
printf("you''re a fool\n");
else
printf("Everything is going well\n");
end
errclear;
end
----- Mail original -----
De: "Jens Simon Strom" <j.s.strom at hslmg.de>
À: "Users mailing list for Scilab" <users at lists.scilab.org>
Envoyé: Jeudi 6 Octobre 2016 11:48:50
Objet: Re: [Scilab-users] Scilab control after an impossible calculation
Try errcatch ().
----------------------------------------------------------------------------
Am 06.10.2016 10:51, schrieb paul.carrico at free.fr :
Hi All
I’m using Scilab as the interface between my optimizer and my finite element solver(s) and sometimes Scilab stops because of unexpected and impossible calculus (1/x with x = 0 as an example ); obviously Scilab stops (and so the optimization).
I’m wondering if it’s possible:
- To ask back Scilab a message such as “hey I crashed because you’re a fool and you’ve not anticipated an impossible calculation !!!”
- To get back Scilab control in order to avoid optimization process crash ? I’ve been thinking in affecting a cost function value at %inf for example (not elegant I recognize)
I don’t know if I’m understandable enough …
Paul
_______________________________________________
users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
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/20161006/519546d6/attachment.htm>
More information about the users
mailing list