matlab绘制简易二维图

matlab绘制简易二维图

ID:34724387

大小:101.14 KB

页数:8页

时间:2019-03-10

matlab绘制简易二维图_第1页
matlab绘制简易二维图_第2页
matlab绘制简易二维图_第3页
matlab绘制简易二维图_第4页
matlab绘制简易二维图_第5页
资源描述:

《matlab绘制简易二维图》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、图1图2图3三幅图的matlab绘图指令图1的matlab绘图指令C=[0,0];B=[600/2,-600*sqrt(3)/2];plot([C(1),B(1)],[C(2),B(2)],'k-'),holdonaxisequalD=[B(1)-B(2),0];plot([D(1),B(1)],[D(2),B(2)],'k-'),holdonplot([C(1)-50,D(1)+50],[C(2),D(2)],'k-','LineWidth',2),holdonn=20;yinying=zeros(2,

2、n+1);yinying(1,1:n+1)=(C(1)-50):((D(1)+50)-(C(1)-50))/n:(D(1)+50);yinying(2,1:n+1)=zeros(1,n+1);yinying(3,1:n+1)=yinying(1,1:n+1)+20*ones(1,n+1);yinying(4,1:n+1)=yinying(2,1:n+1)+20*ones(1,n+1);forii=1:n+1plot([yinying(1,ii),yinying(3,ii)],[yinying(2,ii),

3、yinying(4,ii)],'k-'),holdonendplot(C(1),C(2),'k-','Marker','.','MarkerSize',15)plot(B(1),B(2),'k.','Marker','.','MarkerSize',15)plot(D(1),D(2),'k.','Marker','.','MarkerSize',15)text(C(1)-30,C(2)-20,'C');text(B(1)+20,B(2),'B');text(D(1)+10,D(2)-20,'D');tex

4、t(B(1)+20,B(2)-200,'P','FontWeight','Bold');text(C(1)-100,C(2)-100,'L_{BC}=600mm');text(B(1)-100,B(2)+200,'alpha=30^{。}');text(B(1)+50,B(2)+180,'beta=45^{。}');plot([B(1),B(1)],[B(2),B(2)+200],'k-.'),holdonplot([B(1),B(1)],[B(2),B(2)-200],'k-','LineWidth

5、',1.5),holdonarrow_P=[B(1),B(1)+8,B(1)-11;B(2)-200,B(2)-200+30,B(2)-200+30];fill(arrow_P(1,:),arrow_P(2,:),'k')axis([-200,1000,-800,100])theta=90:(120-90)/30:120;theta=theta*pi/180;r=100;x0=B(1);y0=B(2);x=x0+r*cos(theta);y=y0+r*sin(theta);plot(x,y,'k-'),h

6、oldontheta=45:(120-90)/45:90;theta=theta*pi/180;r=150;x0=B(1);y0=B(2);x=x0+r*cos(theta);y=y0+r*sin(theta);plot(x,y,'k-'),holdonboxoff图2的matlab绘图指令为%cantilever_beam绘图clearallA=[0,-10];B=[0,10];C=[50,-10];D=[50,10];plot([A(1),C(1)],[A(2),C(2)],'k-','LineWid

7、th',1.5),holdonplot([B(1),D(1)],[B(2),D(2)],'k-','LineWidth',1.5),holdonplot([D(1),C(1)],[D(2),C(2)],'k-','LineWidth',1.5),holdonplot([A(1),B(1)],[A(2)-10,B(2)+10],'k-','LineWidth',1.5),holdonaxisequalE=[0,0];F=[100,0];plot([E(1),F(1)],[E(2),F(2)],'k-.'),

8、holdonG=[50,-5];H=[50,5];K=[100,-5];L=[100,5];plot([G(1),K(1)],[G(2),K(2)],'k-','LineWidth',1.5),holdonplot([H(1),L(1)],[H(2),L(2)],'k-','LineWidth',1.5),holdonplot([K(1),L(1)],[K(2),L(2)],'k-','LineWidth',1.5),hold

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。