[討論] 自己練習寫excel讀檔小程式發生錯誤?

看板MATLAB作者 (milano)時間13年前 (2013/01/31 16:42), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
小弟剛學不久,自己練習時發生錯誤,麻煩各位幫幫忙... clear all; [N]=xlsread('test01.xls','A1:A2'); s=1; for i=1:5; a=3; b(s)=a*i*N; s=s+1; end b 執行時發生錯誤: ??? In an assignment A(I) = B, the number of elements in B and I must be the same. Error in ==> Untitled3 at 6 b(s)=a*i*N; 這該如何解決啊? test01.xls檔案內容: 1 6.3 2.3 2.3 7 C2 3 8.3 4.7 4.7 9 pi 5 yes 3.8 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 120.126.8.121
文章代碼(AID): #1H2Yvr93 (MATLAB)
文章代碼(AID): #1H2Yvr93 (MATLAB)