作者s1110608 (s1110608)
看板MATLAB
標題[問題] randint
時間Tue Apr 15 11:13:17 2014
請問如果我要用randint產生某兩個數的亂數
例如1跟3
randint(1,10,[1 3])
要如何才能避開中間的2呢?
有沒有比較簡單的方法呢
謝謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.117.163.52
※ 文章網址: http://www.ptt.cc/bbs/MATLAB/M.1397531601.A.5CA.html
→ ejialan:randint(1,10,[0 1])*2+1 04/15 11:22
→ poiuy777:盡量不要用randint 速度很慢 某版後就不支援了 04/18 21:28
→ poiuy777:round(rand()) 04/18 21:30