[Scilab-users] setting the seed of grand

Rafael Guera jrafaelbguerra at hotmail.com
Mon Jun 29 23:55:32 CEST 2015


 
What about getting the k-loop outside? 
 
for k=1:100
  x=grand(10,10,'nor',0,1)
  for i=1:100
     for j=1:100     
        ・・・・・
     end
  end
end
 
Not possible?
 
Rafael
 
From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Eric Dubois
Sent: Monday, June 29, 2015 7:06 PM
To: International users mailing list for Scilab.
Subject: Re: [Scilab-users] setting the seed of grand
 
Hi
 
I do nbot understand why you should keep the same seed (it should give rise to 10000 times the same results), but teh way to do that is:
 
S=grand("getsd")
for i=1:100
  for j=1:100
     for k=1:100
        grand("setsd",S")
        x=grand(10,10,'norm',0,1)
        ・・・・・
     end
  end
end
 
Éric.
 
2015-06-29 19:12 GMT+02:00 fujimoto2005 <fujimoto2005 at gmail.com <mailto:fujimoto2005 at gmail.com> >:
I want to  set the same seed for same k for every i,j.

for i=1:100
  for j=1:100
     for k=1:100
        x=grand(10,10,'norm',0,1)
        ・・・・・
     end
  end
end
Pleas teach me how to set such seed.





--
View this message in context: http://mailinglists.scilab.org/setting-the-seed-of-grand-tp4032520.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
_______________________________________________
users mailing list
users at lists.scilab.org <mailto:users at lists.scilab.org> 
http://lists.scilab.org/mailman/listinfo/users
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20150629/dbc3d158/attachment.htm>


More information about the users mailing list