Re: [Scilab-users] modifying a variable changes the value of another variable!!!

2013-01-29 Thread Ezequiel Soule
Hi Rafael, thank you for your answer. I'm running the code with the minimum variables required for it (positions, radius, number of spheres). it can be some sort of error generating in the output (or in some internal calculation) of calc_D_superp_dobcel, but I don't think it is roundoff, why

Re: [Scilab-users] modifying a variable changes the value of another variable!!!

2013-01-28 Thread Dang, Christophe
Hello, Now, if I define another variable, the number of iterations to converge changes! [...] the problem is that this difference propagates exponentially Maybe you could send us a minimal script reproducing the problem? Regards -- Christophe Dang Ngoc Chan Mechanical calculation

Re: [Scilab-users] modifying a variable changes the value of another variable!!!

2013-01-28 Thread Ezequiel Soulé
The algorithm essentially starts with a set of spheres in random positions and in a relatively dense state, and runs an iterative process where the spheres are moved in each iteration in order to reduce the overlaps. The core of the script is more or less like this

Re: [Scilab-users] modifying a variable changes the value of another variable!!!

2013-01-28 Thread Serge Steer
If the initial position of your sphere are randomly set, it can be normal than you do not have the same number of iteration from one simulation to an other one. can you check using rand(seed,0) to force identical initial points for your various tests. Serge Steer Le 28/01/2013 16:18, Ezequiel

Re: [Scilab-users] modifying a variable changes the value of another variable!!!

2013-01-28 Thread Ezequiel Soule
Sorry I didn't clarify that: I define the initial random positions, I store them in a variable, say pos_in, and then I call the functions (the different versions) with pos_in as input, so the initial positions are the same in every case. On 28/01/13 14:07, Serge Steer wrote: If the initial

[Scilab-users] modifying a variable changes the value of another variable!!!

2013-01-25 Thread ezequiel soule
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