[問題] 陣列存值問題
目前有兩個變數空間,內各自有9*10的值
假設名字為 numx numy
想要做一個陣列Newstruct把 numx 跟 numy 存進去
本來是想用for一個一個存
使得Newstruct(5,6).numx = numx(5,6)
但是結果不如預期
for i = 1:10
for j = 1:9
Newstruct.numx(j,i) = numx(j,i);
end
end
出來之後的 Newstruct 變成一個有numx numy的東西
如果輸入Newstruct(5,6).numx
就會顯示超界
請問我要怎麼修改程式呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 59.115.82.237
※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1439461248.A.C4B.html
→
08/13 18:22, , 1F
08/13 18:22, 1F
一時手滑...
※ 編輯: Fugacious (59.115.82.237), 08/13/2015 18:26:19
推
08/14 03:17, , 2F
08/14 03:17, 2F
討論串 (同標題文章)