看板 MATLAB 關於我們 聯絡資訊
目前我的程式碼是這樣: class1={}; for a=1:10 for i=unidrnd(7) class1=vertcat(class1,['X', num2str(i), num2str(a)]); end end class1 要怎麼寫才可以在輸出每一個X的時候同時輸出一個random的值 同時這個當i值相同時 random的值也會相同 謝謝幫我想的大大 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.114.54.170 ※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1460389998.A.58B.html