smilemare 发表于 2009-5-2 10:58

matlab出现错误了

本帖最后由 smilemare 于 2009-5-2 10:59 编辑

dates=length(a);
   y(dates,4)=0;
   x(dates,4)=0;
   y(1,0  )=0;
   Q=[];
for i=2:dates;
    for j=1:4  ;
   =maxprosto(i,a,b,c,d);
   output=m;
%   Q(i)=output;
%end   
          y(i,j)=y(i-1,j)+x(i,j);
        if     x(i-1,j)>0,
            rem(x(i-1,j),100)=0;
        end
   end
end
错误响应是:
Index exceeds matrix dimensions.
Error in ==>
          y(i,j)=y(i-1,j)+x(i,j);

smilemare 发表于 2009-5-2 11:58

咋就没来个强淫
页: [1]
查看完整版本: matlab出现错误了