看板 MATLAB 關於我們 聯絡資訊
大家好 想問大家如果用for指令 可以達到 固定除於同樣行數嗎 例如 分子為 [1 3 5 7 9 10] 分母為 [2 7] 如何達到 [1/2 3/7 5/2 7/7 9/2 10/7] 按次序相除呢 感謝指點 -- 一個人吃飯 一個人看電影 一個人喝咖啡 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.56.1.39 ※ 文章網址: http://www.ptt.cc/bbs/MATLAB/M.1401804832.A.84D.html
celestialgod:a=1:2:10; b=[2,7]; a ./ repmat(b, 1, 3) 06/03 22:20
celestialgod:a=[1:2:9, 10] 06/03 22:24
再次感謝 謝謝指點 ※ 編輯: newdas (1.160.164.15), 06/03/2014 23:40:44 ※ 編輯: newdas (1.160.164.15), 06/03/2014 23:44:57