查看单个帖子
旧 2012-12-29, 11:01   #1
hmx1620
初级会员
 
注册日期: 2012-12-15
帖子: 3
声望力: 0
hmx1620 正向着好的方向发展
默认 如何用while循环读取任意数量的数据,

如何用while循环读取任意数量的数据,

i=1;
n(:,i)=input('please input the [x y]\n');
while isempty( n(:,i))==0
i=i+1;
n(:,i)=input('please input the [x y]\n') ;
end

这是我编的程序,但是每当我只输入回车时屏幕就会出现
Subscripted assignment dimension mismatch.

Error in Untitled (line 6)
n(:,i)=input('please input the [x
y]\n')
这是怎么回事呀?新手谢谢指点
hmx1620 当前离线   回复时引用此帖