Follow up from yesterday's NS code.
Check at the 3500th iteration if it is above the desired/actual/computed/pleasant number.
if yes,
break
no?
go to hell!!!
(I mean to 10000th iteration)
ha ha!
%%%%%%%%%%%%%%%%%%%
if nest = = 3500
[x,y,z] = Results(Samples, nest, logZ);
if x>0.1
break
end
end
Friday, June 20, 2008
Thursday, June 19, 2008
Hurray!
I will be online, coding.
So, lets dump some ideas here.
Everything will be personal. And I will not leave a single hint on who am I.
So, lets dump some ideas here.
Everything will be personal. And I will not leave a single hint on who am I.
Wednesday, June 18, 2008
Imaginary standard deviation: Discussion with Deniz: Because even after the convergence has been achieved, the program keeps adding small logZ (whic
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!
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!
Tuesday, April 1, 2008
How to create movie
countme=1;
figure;
for i = 1:n
x = Obj(i).x;
y = Obj(i).y;
plot(x,y,'o');
hold on
axis([-2 2 0 2]);
end
hold off
% ***************************************
% print(gcf, '-djpeg',['nnn',num2str(nest)])% this saves the pictures in jpeg format, with numbers in filename.
% **************************************
h=get(0,'CurrentFigure');
F(countme)=getframe(h);
F(countme)=getframe(gcf);
% **********************************
% save(['C:\academy\knuth\lighthouse\myWS', num2str(countme)]) % saves the work space without completion of loop
% ***********************************
countme=countme+1;
end
movie(F); % This is not working to create movie in my case.
% movie2avi(F,'movie');
figure;
for i = 1:n
x = Obj(i).x;
y = Obj(i).y;
plot(x,y,'o');
hold on
axis([-2 2 0 2]);
end
hold off
% ***************************************
% print(gcf, '-djpeg',['nnn',num2str(nest)])% this saves the pictures in jpeg format, with numbers in filename.
% **************************************
h=get(0,'CurrentFigure');
F(countme)=getframe(h);
F(countme)=getframe(gcf);
% **********************************
% save(['C:\academy\knuth\lighthouse\myWS', num2str(countme)]) % saves the work space without completion of loop
% ***********************************
countme=countme+1;
end
movie(F); % This is not working to create movie in my case.
% movie2avi(F,'movie');
Wednesday, March 12, 2008
Matlab Picture
print(gcf, '-djpeg',['nnn',num2str(nest)])% this saves the pictures in jpeg format, with numbers in filename.
(in my case nest runs in loop in the lighthouse problem, so will get the names of the loop)
(in my case nest runs in loop in the lighthouse problem, so will get the names of the loop)
Friday, February 15, 2008
How to hide the nav bar at the top in blogspot
Paste the following code just after the Header starts (after the head tag)
Date: 15 Feb 2008
Updated by: dai
----------------------------------------------- */
.navbar {
display:none;
}
* {
margin: 0;
padding: 0;
}
ब्लॉगर टेम्पलेट स्टाइल
नेम: रौंदेर्स ३
डिजाइनर: डगलस बोव्मन
उरल: व्व्व.स्तोप्देसिग्न.कॉम
Date: 27 Feb 2004
Updated by: Blogger Team
----------------------------------------------- */
.navbar {
display:none;
}
* {
margin: 0;
padding: 0;
}
-->
Date: 15 Feb 2008
Updated by: dai
----------------------------------------------- */
.navbar {
display:none;
}
* {
margin: 0;
padding: 0;
}
ब्लॉगर टेम्पलेट स्टाइल
नेम: रौंदेर्स ३
डिजाइनर: डगलस बोव्मन
उरल: व्व्व.स्तोप्देसिग्न.कॉम
Date: 27 Feb 2004
Updated by: Blogger Team
----------------------------------------------- */
.navbar {
display:none;
}
* {
margin: 0;
padding: 0;
}
-->
Subscribe to:
Posts (Atom)