作业帮 > 综合 > 作业

关于出现 MATLAB Error using ==> plot Vectors must be the same le

来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/17 08:04:36
关于出现 MATLAB Error using ==> plot Vectors must be the same lengths.
>> % 输入参数区%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
S=0.27;% 饱和体积含水量
R=0.081;% 残余体积含水量;%浸润时的残余体积含水量
d1=4.2;
b1=1.75;% 浸润边界的参数
d2=6.1;
b2=2.49;% 干燥边界的参数
G=[3 2.55 2.2 1.7];
C=20;% 韦昌富参数
Pc=ones(1,75);%定义一个有100个元素的矩阵,用来装吸力
W=ones(1,75);% 定义一个有100个元素的矩阵,用来装体积含水量%%%%%本文方法扫描线计算段%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Pc(1)=3;% 定义第一个反弯点的数值
for i=1:75
Pc(i+1)=Pc(i)-0.05;
end
for i=1:75
Wet(i)=b1.*((S-Pc(i))./(Pc(i)-R)).^(1/d1);
Dry(i)=b2.*((S-Pc(i))./(Pc(i)-R)).^(1/d2);
end
for i=1:75
W(i)=Wet(i)+(S-Wet(i)).*(Dry(1)-Wet(1))./(S-Wet(i));
end
Non(j)=plot(Pc,W,'k')
Warning:Imaginary parts of complex X and/or Y arguments ignored
Error using ==> plot
Vectors must be the same lengths.
关于出现 MATLAB Error using ==> plot Vectors must be the same le
你的Pc有76个,W有75个,怎么画图啊?