1.弹性蹦球演示程序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.