[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: |
Juan Pablo Carbajal |
Subject: |
Re: Calculation issue with octave (data unexpectedly go to zero at some point) |
Date: |
Thu, 27 Feb 2014 23:58:42 +0100 |
On Thu, Feb 27, 2014 at 11:19 PM, rchretien <address@hidden> wrote:
> Thank you all for your answers.
>
> I understand you better Michael. I have found back a much (much !) simpler
> version of the code, exhibiting the same problem with octave, dating of last
> September, so that it should be simple to launch. Please, find that version
> here :
>
> https://www.dropbox.com/sh/hiuv8u4jxqk2hs3/tI_GfBHJ3Y
>
> Simply uncompress the archive, composed of a minimalistic version of the
> code. To launch it, use the function called main that way :
>
> [expectedPopulationOfGroundState] = main(N)
>
> where N is a parameter denoting the number of realisations of the method (I
> suggest to put N=1, since the problem does not depend on N).
>
> Then, look at what happens when launched under Octave :
>
>
>> expectedPopulationOfGroundState =
>>
>> 0.00000
>> 0.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 1.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>> 0.00000
>
> And what happens when launched under matlab
>
>
>> expectedPopulationOfGroundState =
>>
>> 0.0000
>> 0
>> 0
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>> 1.0000
>
> Since the problem treated here is the spontaneous emission of a photon by an
> atom, the expected population of the ground state is expected to be one when
> the time is large (this explanation is given just in case someone tries to
> understand the code).
>
> Bill, I have read your answer and I am going to test tomorrow since I am
> running out of time tonight. I will provide more details tomorrow if
> necessary.
>
> Once again, thank you for your help.
>
> Best regards,
>
> Renaud
>
>
>
> --
> View this message in context:
> http://octave.1599824.n4.nabble.com/Calculation-issue-with-octave-data-unexpectedly-go-to-zero-at-some-point-tp4662177p4662452.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
Look, this is hardly a minimalistic code... Indeed, you can isolate
the problem quit eeasily.
If you just print the value of n inside your function
temporalEvolution (I called main(10)), you will see that indeed n
reaches only up to 27 instead of 51.
This says the mod(t, 0.2/Gamma) is zero only 27 times. So the question
to ask is whether the vector "y" in the following code is the same in
matlab and in octave
Gamma = 1.62e7;
duration = 10/Gamma;
dt = 0.0025/Gamma;
t = 0:dt:duration;
y = mod (t, 0.2/Gamma);
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), (continued)
- 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, 2014/02/28
- 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 <=
- 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
- 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
- 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), Juan Pablo Carbajal, 2014/02/28