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 saw 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?



--
View this message in context: 
http://mailinglists.scilab.org/modifying-a-variable-changes-the-value-of-another-variable-tp4025762.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to