How can i repeat the simulation method?
2 次查看(过去 30 天)
显示 更早的评论
I have these steps to simulate data
pd= makedist('normal')
x = rand(pd,30,1)
How can I repeat the data generation process?
0 个评论
回答(1 个)
Image Analyst
2018-2-10
Call the functions multiple times. For example you can put it into a for loop:
for k = 1 : 100
pd= makedist('normal')
x = rand(pd,30,1)
% Now do something with x.
end
but that's SO obvious that I don't think it answers your question because you must have already considered that trivial solution. Please explain better.
3 个评论
Walter Roberson
2018-2-10
Well, I do not see any point in initializing pd every time through the loop instead of just once before the loop.
I also do not understand why you do not just use randn()
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!