<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>yes, I got it already, thanks a lot.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; background-color: transparent;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; background-color: transparent;"><span><br></span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> On Wednesday, 11 June 2014, 14:42, Paul Bignier <paul.bignier@scilab-enterprises.com>
wrote:<br> </font> </div> <br><br> <div class="y_msg_container"><br>Hello,<br><br>How about taking the five first elements of a permutation of vector 1:10 ?<br><br>Random_10 = grand(1, "prm", 1:10);<br>Random_5 = Random_10(1:5)<br><br><a href="http://help.scilab.org/docs/5.5.0/en_US/grand.html" target="_blank">http://help.scilab.org/docs/5.5.0/en_US/grand.html</a><br><br>Regards,<br>Paul<br><br><br>On 06/11/2014 05:34 AM, tanthiamhuat wrote:<br>> how do I generate 5 UNIQUE, DISTINCT random integer between 1 and 10?<br>><br>> I try this, but it is not unique.<br>><br>> Random_5=round(rand(1,5)*9)+1<br>><br>><br>><br>> --<br>> View this message in context: <a href="http://mailinglists.scilab.org/Generate-5-unique-random-integer-number-between-1-and-10-tp4030712.html" target="_blank">http://mailinglists.scilab.org/Generate-5-unique-random-integer-number-between-1-and-10-tp4030712.html</a><br>> Sent from the Scilab
users - Mailing Lists Archives mailing list archive at Nabble.com.<br>> _______________________________________________<br>> users mailing list<br>> <a ymailto="mailto:users@lists.scilab.org" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>> <a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br><br>-- <br>Paul BIGNIER<br>Development engineer<br>-----------------------------------------------------------<br>Scilab Enterprises<br>143bis rue Yves Le Coz - 78000 Versailles, France<br>Phone: +33.1.80.77.04.69<br><a href="http://www.scilab-enterprises.com/" target="_blank">http://www.scilab-enterprises.com</a><br><br>_______________________________________________<br>users mailing list<br><a ymailto="mailto:users@lists.scilab.org" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br><a href="http://lists.scilab.org/mailman/listinfo/users"
target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br><br><br></div> </div> </div> </div> </div></body></html>