Ezequiel,

I recommend you to create a minimal code example which reproduces the
problem you have at hands and to submit it to the users list for evaluation.
It will be easier to help you.

Best regards.
Rafael G.

-----Original Message-----
From: users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org]
On Behalf Of Ezequiel Soule
Sent: Monday, January 28, 2013 10:14 AM
To: users@lists.scilab.org
Subject: [Scilab-users] modifying a variable changes the value of another
variable!!!

Hello, I am using some iterative algorithm defined as a function in a .sci
file, and I have the following problem: the iterations in the algorithm are
controlled by a given variable. Now, if I define another variable, (which DO
NOT affect the values of the control variable nor the way it is calculated)
in the function, the number of iterations to converge changes! What happens
is that the value of the control variable, for some reason, is modified. It
is not a very significant modification, actually the difference is in the
order of 10^-15... the problem is that this difference propagates
exponentially as the iterations advance, and the total number of iterations
and the final result (which is not unique) can be modified drastically!
My question is, why the value of the control variable is modifyied by the
definition a completely independent variable. I saw this problem in scilab
5.4.0 and 5.2.2. I also had a similar, but worse, problem, before with a
similar algorithm. I just added a command "pause" in the function, and this
command was even OUTSIDE the while loop that defined the iterations... and
the number of iterations was modyfied. How can this happen?

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to