MAtlab中To RESHAPE the number of elements must not change.
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/06/17 06:51:09
MAtlab中To RESHAPE the number of elements must not change.
N1=14328;
N2=14328;
fid=fopen('ddfield.E15','r');
size=fscanf(fid,'%g');
fclose(fid);
aa1=reshape(size,9,N1*N2);
% X=reshape(aa1(1,:),N1,N2);
% Y=reshape(aa1(2,:),N1,N2);
% Z=reshape(aa1(3,:),N1,N2);
X=linspace(-15,15,N1);
Y=linspace(-15,15,N2);
Ex=reshape(aa1(4,:),N1,N2)+i*reshape(aa1(5,:),N1,N2);
Ey=reshape(aa1(6,:),N1,N2)+i*reshape(aa1(7,:),N1,N2);
Ez=reshape(aa1(8,:),N1,N2)+i*reshape(aa1(9,:),N1,N2);
E=(abs(Ex).^2+abs(Ey).^2+abs(Ez).^2).^(1/2);
figure,imagesc(X,Y,E)
colorbar
N1=14328;
N2=14328;
fid=fopen('ddfield.E15','r');
size=fscanf(fid,'%g');
fclose(fid);
aa1=reshape(size,9,N1*N2);
% X=reshape(aa1(1,:),N1,N2);
% Y=reshape(aa1(2,:),N1,N2);
% Z=reshape(aa1(3,:),N1,N2);
X=linspace(-15,15,N1);
Y=linspace(-15,15,N2);
Ex=reshape(aa1(4,:),N1,N2)+i*reshape(aa1(5,:),N1,N2);
Ey=reshape(aa1(6,:),N1,N2)+i*reshape(aa1(7,:),N1,N2);
Ez=reshape(aa1(8,:),N1,N2)+i*reshape(aa1(9,:),N1,N2);
E=(abs(Ex).^2+abs(Ey).^2+abs(Ez).^2).^(1/2);
figure,imagesc(X,Y,E)
colorbar
![MAtlab中To RESHAPE the number of elements must not change.](/uploads/image/z/2339722-10-2.jpg?t=MAtlab%E4%B8%ADTo+RESHAPE+the+number+of+elements+must+not+change.)
你要reshape的话变之前和变了之后元素总数得相等, 你不可能把一个1000个元素的矩阵reshape成含有2000元素的矩阵
MAtlab中To RESHAPE the number of elements must not change.
reshape matlab To RESHAPE the number of elements must not ch
我的MATLAB积分程序出现错误To RESHAPE the number of elements must not c
matlab运行程序时出现To RESHAPE the number of elements must not chan
MATLAB提示Error using reshape To RESHAPE the number of element
matlab中出现?In an assignment A(I) = B,the number of elements i
matlab中: The number of rows in Y must equal the number of ro
matlab中提示The length of X must match the number of rows of Y
Matlab中,运行程序出现The length of X must match the number of rows
求问matlab 的 In an assignment A(I) = B,the number of elements
Matlab绘图In an assignment A(I) = B,the number of elements in
matlab问题求救 In an assignment A(I) = B,the number of elements