看板 MATLAB 關於我們 聯絡資訊
各位好 我想根據不同的變數產生字串 比如5個變數像這樣: {'x1','x2','x3','x4','x5'} 如果有100個變數, Matlab要如何寫? 謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 100.36.131.156 (美國) ※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1618278142.A.61F.html
mp19990920: arrayfun(@(x) ['x', num2str(x)],... 04/13 11:16
mp19990920: 1:10, 'UniformOutput', false) 04/13 11:17
sppmg: sprintf() 也可 04/13 12:36
wgene: 感謝! 04/13 13:22