MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 如何用while循环读取任意数量的数据, (https://www.labfans.com/bbs/showthread.php?t=18628)

hmx1620 2012-12-29 11:01

如何用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')
这是怎么回事呀?新手谢谢指点


所有时间均为北京时间。现在的时间是 14:56

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.