MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]请高手指教,??? Subscript indices must either be real positive integers or logicals (https://www.labfans.com/bbs/showthread.php?t=6733)

Jael 2009-03-08 22:05

[求助]请高手指教,??? Subscript indices must either be real positive integers or logicals
 
我写了一段程序,
load('CrimeFprint.mat');
fopen('CrimeFprint.mat');
imshow(crime);
p=fopen('CrimeFprint.mat');
[y,t]=fread(p);
[r1,r2]=size(y);
H=r1-(512*512);
X=y((H+1):t);
出现了这样的错误:
??? Subscript indices must either be real positive integers or logicals.
Error in ==> dippart2 at 11
X=y((H+1):t);
请高手指教这是为什么?该怎么改?

silas_xue 2009-03-10 00:55

回复: [求助]请高手指教,??? Subscript indices must either be real positive integers or logicals
 
这个错误的翻译是“???下标需要为正实整数或者逻辑数”

因为我不太清楚你用来做什么处理,所以还不敢确定怎么改。问题出在你这里H的值是否可能会是0或者赋值,以导致Matlab写出这样的error.

Thx for reading.


所有时间均为北京时间。现在的时间是 03:39

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