看板 MATLAB 關於我們 聯絡資訊
請問如果我要用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