Imaginary standard deviation:
Discussion with Deniz:
Because even after the convergence has been achieved, the program keeps adding small logZ (which should not be the case).
That means:
[w_array] = Results1(Samples, nest, logZ);
mean(x) = 0.33611 stdev(x) = 0+1.6919e-006i
mean(y) = 0.34601 stdev(y) = 0+1.7417e-006i
mean(z) = 0.33582 stdev(z) = 0+1.6904e-006i
>> sum(w_array)
ans =
1.0000
>> format long
>> ans
ans =
1.000000000025338
Which is the problem, as this can result into imaginary stdev!!!
One of the approach to solve this problem would be to have a stopping criterion in the algorithm. This can be something like this:
If logZ(i+1)-logZ(i) < = eps
STOP!!!
Lets see!
No comments:
Post a Comment