Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
普通会员
注册日期: 2009-03-05
年龄: 37
帖子: 34
声望力: 17 ![]() |
![]()
我写了一段程序,
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); 请高手指教这是为什么?该怎么改? |
![]() |
![]() |
![]() |
#2 |
高级会员
注册日期: 2008-11-01
年龄: 39
帖子: 406
声望力: 26 ![]() |
![]()
这个错误的翻译是“???下标需要为正实整数或者逻辑数”
因为我不太清楚你用来做什么处理,所以还不敢确定怎么改。问题出在你这里H的值是否可能会是0或者赋值,以导致Matlab写出这样的error. Thx for reading. |
![]() |
![]() |