[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calculation issue with octave (data unexpectedly go to zero at some
From: |
rchretien |
Subject: |
Re: Calculation issue with octave (data unexpectedly go to zero at some point) |
Date: |
Fri, 28 Feb 2014 10:33:40 -0800 (PST) |
Thank you all for your answers. I will try to answer every question that was
asked to me.
@ Gordon : You are right, I am drawing pseudo-random numbers at a certain
point in the code. I am not aware of Mersenne-Twister and /dev/random stuff,
so that I have simply used the rand() function the simplest way possible, in
order to get a pseudo-random number whose distribution is uniform in [0,1].
For the entropy of the system, here is what I got (I am running Linux, no
problem of translation under other OS) :
address@hidden ~]$ cat /proc/sys/kernel/random/entropy_avail
3464
@ Juan-Pablo : Indeed, I have printed the value taken by "n", value which
stops increasing at 27 under octave and goes as expected to 51 under matlab,
which I have explained in a previous message. I should have mentioned it
again, sorry for that. Concerning the outputs you asked for, they look to be
the same (visual constatation).
@ Bill : This is exactly what I expect from the code. Your suggestion about
the modulo is interesting. However, since your example using a comparison to
an epsilon yields different results, have you got another idea on how I
could perform the modulo operation ?
@ Dmitri and Briankaz : Why calling modulo on non-integer numbers is a bad
idea ? Does it come from roundoff errors in the numerical representation of
real numbers ? Have you got a suggestion for performing such an operation
with no risk of failure ? Basically, I want to record the simulation results
only at some multiple integers of the time step dt.
@ Dmitri (again) : can you please develop your explanation in the message
posted at 1:21 am
@ Juan-Pablo : your "mod_ml" function seems to work perfectly (both on the
much simplified and older version I posted and on the latest version of the
code). I wait before becoming too enthusiastic (I have to perform further
checkings tonight) but I think your function fixed the problem :) Now, is
the problem I had before related to a bad usage of modulo or related to a
bad coded modulo function ?
Thanks to all of you,
Renaud
--
View this message in context:
http://octave.1599824.n4.nabble.com/Calculation-issue-with-octave-data-unexpectedly-go-to-zero-at-some-point-tp4662177p4662512.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Calculation issue with octave (data unexpectedly go to zero at some point), rchretien, 2014/02/22
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Michael Goffioul, 2014/02/23
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), rchretien, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Juan Pablo Carbajal, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Michael Goffioul, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Ozzy Lash, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), rchretien, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), ghaverla, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point),
rchretien <=
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Juan Pablo Carbajal, 2014/02/28
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Przemek Klosowski, 2014/02/28
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), ghaverla, 2014/02/28
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Juan Pablo Carbajal, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Ozzy Lash, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Ozzy Lash, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Dmitri A. Sergatskov, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Brian Kaczynski, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Dmitri A. Sergatskov, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Ben Abbott, 2014/02/27