求助:matlab中用plot函数画图,怎么没有出现曲线啊,下面是程序,希望哪位大侠帮我看一下

clear;clc;%%%%%%%%%%%%%%%%%%%%%%plotyourfigurebefore%%%%%%%%%%%%%%%%%%%%%%figureresiz... clear;
clc;
%%%%%%%%%%%%%%%%%%%%%

%plot your figure before

%%%%%%%%%%%%%%%%%%%%%

% figure resize
set(gcf,'Position',[100 100 336 264]);
set(gca,'Position',[.165 .17 .80 .74]);
figure_FontSize=9;
set(get(gca,'XLabel'),'FontSize',figure_FontSize,'Vertical','top');
set(get(gca,'YLabel'),'FontSize',figure_FontSize,'Vertical','middle');
set(findobj('FontSize',10),'FontSize',figure_FontSize);
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',2);
% 输入参数区%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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个元素的矩阵,用来装体积含水量%%%%%本文方法扫描线计算段%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Wet=ones(1,75);
Dry=ones(1,75);
Pc(1)=3;% 定义第一个反弯点的数值

for i=1:75
Pc(i)=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
plot(Pc,W)

%本文方法扫描线计算段%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%设定坐标轴范围和属性%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
set(gca,'XLim',[0.5 4]);
set(gca,'YLim',[0.05 0.3]);
set(gca,'Ytick',[0.05:0.05:0.3]);
xlabel('基质吸力(Kpa)');
ylabel('体积含水量');
title('(b)');
展开
 我来答
百度网友e56ba1038
2011-02-24 · TA获得超过2499个赞
知道小有建树答主
回答量:821
采纳率:0%
帮助的人:0
展开全部

试一下:

clear;

clc;

%%%%%%%%%%%%%%%%%%%%%

%plot your figure before

%%%%%%%%%%%%%%%%%%%%%

% figure resize

set(gcf,'Position',[100 100 336 264]);

set(gca,'Position',[.165 .17 .80 .74]);

figure_FontSize=9;

set(get(gca,'XLabel'),'FontSize',figure_FontSize,'Vertical','top');

set(get(gca,'YLabel'),'FontSize',figure_FontSize,'Vertical','middle');

set(findobj('FontSize',10),'FontSize',figure_FontSize);

set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',2);

% 输入参数区%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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个元素的矩阵,用来装体积含水量%%%%%本文方法扫描线计算段%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Wet=ones(1,75);

Dry=ones(1,75);

Pc(1)=3;% 定义第一个反弯点的数值

for i=1:75

   Pc(i)=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

plot(Pc,W)

%本文方法扫描线计算段%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%设定坐标轴范围和属性%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% set(gca,'XLim',[0.5 4]);

% set(gca,'YLim',[0.05 0.3]);

% set(gca,'Ytick',[0.05:0.05:0.3]);

xlabel('基质吸力(Kpa)');

ylabel('体积含水量');

title('(b)');

推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式