看板 MATLAB 關於我們 聯絡資訊
小弟剛學不久,自己練習時發生錯誤,麻煩各位幫幫忙... 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