[Scilab-users] setting the seed of grand

fujimoto2005 fujimoto2005 at gmail.com
Tue Jun 30 02:45:52 CEST 2015


Dear, Erick and Rafael

The actual script is like this.
I want to exclude the effect of the different seed for the value of d(i,j,k)
whit different i,j.

for i=1:100
  for j=1:100
     for k=1:100
        grand("setsd",S")
        x=grand(10,10,'norm',0,1)
	y(i,j,k)=sum(mean(f(p1(i),p2(j),k,X)),'r'),'c')
        ・・・・・
     end
  end
  d(i,j,k)=(y(i,j,k)-y(i-1,j,k))/(p1(i)-p1(i-1))
end

By the way, is the right position of 'the grand("setsd",S")' between 'for
j=1:100' and 'for k=1:100'?

for j=1:100
     grand("setsd",S")
     for k=1:100

Before k-loop, there is a time consuming part independent of k-value .
If k-loop is the most outside loop, time consuming part will be recalculated
and I want to avoid that situation.

Best regards



--
View this message in context: http://mailinglists.scilab.org/setting-the-seed-of-grand-tp4032520p4032523.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list