matlab 提示Error using vertcat CAT arguments dimensions are no
来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/06/03 07:18:04
matlab 提示Error using vertcat CAT arguments dimensions are not consistent.
for i=1965:1:1970 for j=1:12 a=find(a1(:,2)==i&a1(:,3)==j); b=a1(a,:); c=mean(b(:,5)); d=[d;i,j,c]; end end提示矩阵维度出错,可是维度应该并没有出错啊,我记得原来运行这个程序的时候也没提示这个错误.
for i=1965:1:1970 for j=1:12 a=find(a1(:,2)==i&a1(:,3)==j); b=a1(a,:); c=mean(b(:,5)); d=[d;i,j,c]; end end提示矩阵维度出错,可是维度应该并没有出错啊,我记得原来运行这个程序的时候也没提示这个错误.
你把的初始化一下.例如这样修改:
d=[];
for i=1965:1:1970
for j=1:12
a=find(a1(:,2)==i&a1(:,3)==j);
b=a1(a,:);
c=1;%mean(b(:,5));
d=[d;i,j,c];
end
end
由于你没有给出a1矩阵式什么,没法具体给你调试,问题就是d这里.或者是你的d初始化的不是三列
d=[];
for i=1965:1:1970
for j=1:12
a=find(a1(:,2)==i&a1(:,3)==j);
b=a1(a,:);
c=1;%mean(b(:,5));
d=[d;i,j,c];
end
end
由于你没有给出a1矩阵式什么,没法具体给你调试,问题就是d这里.或者是你的d初始化的不是三列
matlab 提示Error using vertcat CAT arguments dimensions are no
Matlab 求助 Error using vertcat CAT arguments dimensions are n
matlab里出现:Error using ==> vertcat CAT arguments dimensions a
Matlab程序提示错误:Error using * Inner matrix dimensions must agre
Error using input Not enough input arguments matlab
matlab--?Error using ==> mtimes Inner matrix dimensions must
matlab Error using ==> mrdivide Matrix dimensions must agree
matlab 错误Error using zy (line 4) Not enough input arguments.
matlab运行时出现N= Error using==>leNot enough input arguments.Err
matlab出问题 Error using ==> mtimes Inner matrix dimensions mus
matlab:Error using ==> mtimes Inner matrix dimensions must a
matlab 显示?Error using ==> mtimes Inner matrix dimensions mus