作者billy00685 (milano)
看板MATLAB
标题[讨论] 自己练习写excel读档小程式发生错误?
时间Thu Jan 31 16:42:27 2013
小弟刚学不久,自己练习时发生错误,麻烦各位帮帮忙...
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