hmx1620
2012-12-29, 11:01
如何用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')
这是怎么回事呀?新手谢谢指点
【
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')
这是怎么回事呀?新手谢谢指点