Matlab动画程序 弹性蹦球演示过程

发表时间:2017-3-9 5:28:49 文章来源:广德教育网 www.codmst.com

Matlab动画程序 弹性蹦球演示过程

figure(1);%定义函数

axis([-5.1,5,-0.05,1.05]);%绘制二维图形

hold on;%保持当前图形及轴系所有的特性

axis("off");%覆盖坐标刻度,并填充背景

%通过填充绘出台阶及两边的挡板

fill([4.12,4.22,4.22,4.12],[-0.05,-0.05,1.05,1.05],"y");

fill([-5,-3.2,-3.2,-5],[-0.05,-0.05,0,0],"g");

fill([-3.2,-2.8,-2.8,-3.2],[-0.05,-0.05,0.2,0.2],"g");

fill([-3.2,-1.4,-1.4,-3.2],[0.2,0.2,0.25,0.25],"g");

fill([-1.4,-1,-1,-1.4],[0.2,0.2,0.45,0.45],"g");

fill([-1.4,0.4,0.4,-1.4],[0.45,0.45,0.5,0.5],"g");

fill([0.4,0.8,0.8,0.4],[0.45,0.45,0.7,0.7],"g");

fill([0.4,2.0,2.0,0.4],[0.7,0.7,0.75,0.75],"g");

fill([2.0,2.3,2.3,2.0],[-0.05,-0.05,0.75,0.75],"g");

fill([2.3,4.12,4.12,2.3],[-0.05,-0.05,0,0],"g");

%x2=line([-5,5],[0.25,0.25],"color","g","linestyle","-", "markersize",50)%设置台阶边框线,颜色,擦试方式

%line([-5,5],[0.5,0.5],"color","b","linestyle","-", "markersize",50)%设置球与地面接触面的颜色,擦试方式

%line([-5,5],[0.75,0.75],"color","b","linestyle","-", "markersize",50)%

设置球与地面接触面的颜


matlab演示  matlab  弹性力学   matlab  robotics演示  
以上关于Matlab动画程序 弹性蹦球演示过程的相关信息是广德教育网收集并且整理,仅为查考。
关于我们  服务范围  版权声明  私隐政策  联系我们  
版权所有:广德教育网(www.codmst.com)教育信息门户 @ 为每个爱好学习的同学提供最好的教育