您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 交通运输 > 交通运输学Matlab画图
1用matlab画交通流密速关系为了作图更明显,这里分别假设畅行速度Sf的数值为1000,阻塞密度Dj的数值为500,这可能和实际情况不符,但是具体运用是可以对程序中的Sf值和Dj值进行更改。一、密度、流速和流量关系图及各种假设情况下的图。图中:左上:V=DS;右上:1931年GreenShields假设S=Sf(1-D/Dj);左下:1959年Greenberg假设S=Sf*ln(Dj/D);右下:1961年Underwood假设。2Matlab的程序如下:Sf=1000;Dj=500;subplot(2,2,1);forD=0:100:Dj;forS=0:10:Sf;V=D*S;plot3(S,D,V,'+r');holdon;end;end;forS=0:100:Sf;forD=0:10:Dj;V=D*S;plot3(S,D,V,'+r');holdon;end;end;Zlabel('流量','FontWeight','bold')Xlabel('流速','FontWeight','bold')Ylabel('密度','FontWeight','bold')title('\fontname{隶书}空间图形')subplot(2,2,2)D=0:10:Dj;S=Sf*(1-D/Dj);plot(S,D,'b*');Zlabel('流量','FontWeight','bold')Xlabel('流速','FontWeight','bold')Ylabel('密度','FontWeight','bold')title('\fontname{隶书}1934年投影到XY平面')view(-37.5,80)subplot(2,2,3)Sf=1000;Dj=500;D=0:10:Dj;S=Sf*log(Dj./D);3plot(S,D,'kh');Zlabel('流量','FontWeight','bold')Xlabel('流速','FontWeight','bold')Ylabel('密度','FontWeight','bold')title('\fontname{隶书}1959年投影到XY平面')view(-37.5,80)subplot(2,2,4)Sf=1000;Dj=500;D=0:10:Dj;S=Sf*exp(-D/Dj);plot(S,D,'gp');Zlabel('流量','FontWeight','bold')Xlabel('流速','FontWeight','bold')Ylabel('密度','FontWeight','bold')title('\fontname{隶书}1961年投影到XY平面')view(-37.5,80)二、GreenShields假设涉及到的图形。4图中:左上:GreenShields假设图形;右上:GreenShields假设图形在XOY平面上的投影;左下:GreenShields假设图形在YOZ平面上的投影;右下:GreenShields假设图形在ZOX平面上的投影。Matlab的程序如下:Sf=1000;Dj=500;subplot(2,2,1)D=0:10:Dj;S=Sf*(1-D/Dj);V=S.*D;plot3(S,D,V,'rh');Zlabel('流量','FontWeight','bold')Xlabel('流速','FontWeight','bold')Ylabel('密度','FontWeight','bold')title('\fontname{隶书}GreenShields假设')subplot(2,2,2)D=0:10:Dj;S=Sf*(1-D/Dj);plot(S,D,'g*');Zlabel('流量','FontWeight','bold')Xlabel('流速','FontWeight','bold')Ylabel('密度','FontWeight','bold')title('\fontname{隶书}GreenShields假设XOY面投影')view(-37.5,80)subplot(2,2,3)D=0:10:Dj;S=Sf*(1-D/Dj);V=S.*D;plot3(S,D,V,'kd');Zlabel('流量','FontWeight','bold')Xlabel('流速','FontWeight','bold')Ylabel('密度','FontWeight','bold')title('\fontname{隶书}GreenShields假设YOZ面投影')view(90,0)subplot(2,2,4)D=0:10:Dj;S=Sf*(1-D/Dj);V=S.*D;plot3(S,D,V,'bs');Zlabel('流量','FontWeight','bold')5Xlabel('流速','FontWeight','bold')Ylabel('密度','FontWeight','bold')title('\fontname{隶书}GreenShields假设ZOX面投影')view(360,0)
本文标题:交通运输学Matlab画图
链接地址:https://www.777doc.com/doc-5491790 .html