Generate a rondom sequence
11 次查看(过去 30 天)
显示 更早的评论
Greetings,
Please can any one help me about:
How to Generate Generate a random sequence Z ={(i, j)},
where i, j Belongs to {1, 2, 3, 4}, i not equal to j
i and j are selected randomly.
Best Regards
0 个评论
采纳的回答
Youssef Khmou
2013-3-15
or you can try :
a=1:4;
v=perms(a); % ALL possible combinations
Z=[v(:,1:2);v(:,3:4)];% Z is 2 columns
更多回答(2 个)
Youssef Khmou
2013-3-15
编辑:Youssef Khmou
2013-3-15
hi,
Random sequence derived from which distribution ?
Z=rand(4); % from Uniform distribution.
Z=randn(4); % from Normal distribution.
Z=random('rayl',(1:4)'*(1:4)) % from Rayleigh distribution
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!