云南大学 软件学院 大学物理实验6

合集下载

大学物理实验6 简谐振动的合成

大学物理实验6  简谐振动的合成

云南大学软件学院 实验报告课程: 大学物理实验 学期: 任课教师: 班级: = 学号: == 序号: = 姓名: = 成绩:实验6 简谐振动的合成内容一 同方向同频率简谐振动的合成两个简谐振动的方程为使用matlab 编写程序,求x1,x2,合振动的波形,讨论相位差对合成振动的影响。

相位差至少讨论4中情况(1.为0°;2.为180°;3.小于180°;4.大于180°),要求所有波形画在同一个figure 中。

()()⎩⎨⎧+=+=222111cos cos ϕωϕωt A x t A x内容二 相互垂直方向同频率简谐振动的合成两个简谐振动的方程为使用matlab 编写程序,求x,y,合振动的波形,讨论相位差对合成振动的影响。

相位差至少讨论4中情况(1.为0°;2.为180°;3.小于180°;4.大于180°),要求所有波形画在同一个figure 中。

()()⎩⎨⎧+=+=y y x x t A y t A x ϕωϕωcos cos内容三相互垂直方向不同频率简谐振动的合成(李萨如图形) 使用matlab编写程序,画李萨如图形,要求:1.至少4种频率比2.至少8种相位差3.所有图形画在同一个figure中,添加标注。

如:cleart = 0:0.01:4;Ax = 1;Ay = 3;w1 = 1; w2 = 1./2;w3 = 2./3;w4 = 3./4;w5 = 2./5;m0 = 0;m1 = 0;m2 = pi./4;m3 = pi./2;m4 = 3.*pi./4;m5 = pi;m6 = 5.*pi./4; m7 =3.*pi./2;m8 = 7.*pi./4; x0 = Ax.*cos(2.*pi*t+m0);y11 = Ay.*cos(2.*w1.*pi*t+m1);y12 = Ay.*cos(2.*w1.*pi*t+m2);y13 = Ay.*cos(2.*w1.*pi*t+m3);y14 = Ay.*cos(2.*w1.*pi*t+m4);y15 = Ay.*cos(2.*w1.*pi*t+m5);y16 = Ay.*cos(2.*w1.*pi*t+m6);y17 = Ay.*cos(2.*w1.*pi*t+m7);y18 = Ay.*cos(2.*w1.*pi*t+m8);y21 = Ay.*cos(2.*w2.*pi*t+m1);y22 = Ay.*cos(2.*w2.*pi*t+m2);y23 = Ay.*cos(2.*w2.*pi*t+m3);y24 = Ay.*cos(2.*w2.*pi*t+m4);y25 = Ay.*cos(2.*w2.*pi*t+m5);y26 = Ay.*cos(2.*w2.*pi*t+m6);y27 = Ay.*cos(2.*w2.*pi*t+m7);y28 = Ay.*cos(2.*w2.*pi*t+m8);y31 = Ay.*cos(2.*w3.*pi*t+m1);y32 = Ay.*cos(2.*w3.*pi*t+m2);y33 = Ay.*cos(2.*w3.*pi*t+m3);y34 = Ay.*cos(2.*w3.*pi*t+m4);y35 = Ay.*cos(2.*w3.*pi*t+m5);y36 = Ay.*cos(2.*w3.*pi*t+m6);y37 = Ay.*cos(2.*w3.*pi*t+m7);y38 = Ay.*cos(2.*w3.*pi*t+m8);y41 = Ay.*cos(2.*w4.*pi*t+m1);y42 = Ay.*cos(2.*w4.*pi*t+m2);y43 = Ay.*cos(2.*w4.*pi*t+m3);y44 = Ay.*cos(2.*w4.*pi*t+m4);y45 = Ay.*cos(2.*w4.*pi*t+m5);y46 = Ay.*cos(2.*w4.*pi*t+m6);y47 = Ay.*cos(2.*w4.*pi*t+m7);y48 = Ay.*cos(2.*w4.*pi*t+m8);y51 = Ay.*cos(2.*w5.*pi*t+m1);y52 = Ay.*cos(2.*w5.*pi*t+m2);y53 = Ay.*cos(2.*w5.*pi*t+m3);y54 = Ay.*cos(2.*w5.*pi*t+m4);y55 = Ay.*cos(2.*w5.*pi*t+m5);y56 = Ay.*cos(2.*w5.*pi*t+m6);y57 = Ay.*cos(2.*w5.*pi*t+m7);y58 = Ay.*cos(2.*w5.*pi*t+m8);subplot(5,8,1);plot(x0,y11);Axis([-4 4 -4 4]);text(-16,0,'ω =1');text(-2,7,'0');text(-16,7,'相位差');subplot(5,8,2);plot(x0,y12);Axis([-4 4 -4 4]);text(-2,7,'π/4'); subplot(5,8,3);plot(x0,y13);Axis([-4 4 -4 4]);text(-2,7,'π/2'); subplot(5,8,4);plot(x0,y14);Axis([-4 4 -4 4]);text(-2,7,'3π/4'); subplot(5,8,5);plot(x0,y15);Axis([-4 4 -4 4]);text(-2,7,'π');subplot(5,8,6);plot(x0,y16);Axis([-4 4 -4 4]);text(-2,7,'5π/4'); subplot(5,8,7);plot(x0,y17);Axis([-4 4 -4 4]);text(-2,7,'3π/2'); subplot(5,8,8);plot(x0,y18);Axis([-4 4 -4 4]);text(-2,7,'7π/4'); subplot(5,8,9);plot(x0,y21);Axis([-4 4 -4 4]);text(-16,0,'ω = 1/2'); subplot(5,8,10);plot(x0,y22);Axis([-4 4 -4 4]);subplot(5,8,11);plot(x0,y23);Axis([-4 4 -4 4]);subplot(5,8,12);plot(x0,y24);Axis([-4 4 -4 4]);subplot(5,8,13);plot(x0,y25);Axis([-4 4 -4 4]);subplot(5,8,14);plot(x0,y26);Axis([-4 4 -4 4]);subplot(5,8,15);plot(x0,y27);Axis([-4 4 -4 4]);subplot(5,8,16);plot(x0,y28);Axis([-4 4 -4 4]);subplot(5,8,17);plot(x0,y31);Axis([-4 4 -4 4]);text(-16,0,'ω = 2/3'); subplot(5,8,18);plot(x0,y32);Axis([-4 4 -4 4]);subplot(5,8,19);plot(x0,y33);Axis([-4 4 -4 4]);subplot(5,8,20);plot(x0,y34);Axis([-4 4 -4 4]);subplot(5,8,21);plot(x0,y35);Axis([-4 4 -4 4]);subplot(5,8,22);plot(x0,y36);Axis([-4 4 -4 4]);subplot(5,8,23);plot(x0,y37);Axis([-4 4 -4 4]);subplot(5,8,24);plot(x0,y38);Axis([-4 4 -4 4]);subplot(5,8,25);plot(x0,y41);Axis([-4 4 -4 4]);text(-16,0,'ω = 3/4'); subplot(5,8,26);plot(x0,y42);Axis([-4 4 -4 4]);subplot(5,8,27);plot(x0,y43);Axis([-4 4 -4 4]);subplot(5,8,28);plot(x0,y44);Axis([-4 4 -4 4]);subplot(5,8,29);plot(x0,y45);Axis([-4 4 -4 4]);subplot(5,8,30);plot(x0,y46);Axis([-4 4 -4 4]);subplot(5,8,31);plot(x0,y47);Axis([-4 4 -4 4]);subplot(5,8,32);plot(x0,y48);Axis([-4 4 -4 4]);subplot(5,8,33);plot(x0,y51);Axis([-4 4 -4 4]);text(-16,0,'ω = 2/5'); subplot(5,8,34);plot(x0,y52);Axis([-4 4 -4 4]);subplot(5,8,35);plot(x0,y53);Axis([-4 4 -4 4]);subplot(5,8,36);plot(x0,y54);Axis([-4 4 -4 4]);subplot(5,8,37);plot(x0,y55);Axis([-4 4 -4 4]);subplot(5,8,38);plot(x0,y56);Axis([-4 4 -4 4]);subplot(5,8,39);plot(x0,y57);Axis([-4 4 -4 4]);subplot(5,8,40);plot(x0,y58);Axis([-4 4 -4 4]);。

云南大学软件学院Java实验六

云南大学软件学院Java实验六

云南大学软件学院实验报告姓名:王定欢学号:20141120188专业:软件工程日期:2016-10-27 成绩:JAVA实验六一、实验目的:熟悉类的继承以及子类、抽象类的使用。

会使用子类、抽象类,会使用相关构造方法。

二、实验要求:Part1:Write a program called CollegeCourse that computes the cost of taking a college course. Include a constructor that requires a course ID number.Add a subclass Lab to compute a lab fee for a course that uses a lab. Write a program UseCourse to use the classes. Save the programs as CollegeCourse, Lab, and UseCourse. Put them all in a package called b6.For example, the output could be:The cost of your course is $180.0there is a $25.00 lab fee.The cost of your course is $205.0Part2:Create an abstract Auto(汽车) class with fields for the car make and price. Include get and set methods for these fields; the setPrice() method is abstract.Create two subclasses for individual automobile makers (for example, Ford and Chevy) and include appropriate setPrice() methods in each subclass. Finally, write a program that uses the Auto class and subclasses to display information about different cars.Sample Output:A new Ford costs $20000.0A new Chevy costs $22000.0三、实验内容:Part1、CollegeCourse.javapackage b6;public class CollegeCourse {public static String Id = "a123456";public double computCost(){d ouble cost = 180.0;return cost;}}Lab.javapackage b6;public class Lab extends CollegeCourse{public double LabFee(){double labFee = 25.0;return labFee;}}UseCourse.javapackage b6;public class UseCourse{public static void main(String[] args){CollegeCourse cost = new CollegeCourse();Lab labFee = new Lab();System.out.println("Your course Id is:"+CollegeCourse.Id);System.out.println("The cost of your course is:"+putCost());System.out.println("There is a $"+bFee()+" labFee");System.out.println("The cost of your courseis:"+(putCost()+bFee()));}}实验结果:Your course Id is:a123456The cost of your course is:180.0There is a $25.0 labFeeThe cost of your course is:205.0Part2、Auto.javapackage Auto;abstract class Auto {public String carMake;public double price;public void setMake(String carMake){ this.carMake = carMake;}public String getMake(){return carMake;}abstract void setPrice(double price);abstract double getPrice();}Chevy.javapackage Auto;//抽象类不能实例化对象public class Chevy extends Auto{//重写父类方法void setPrice(double price) {// TODO Auto-generated method stubthis.price = price;}double getPrice() {// TODO Auto-generated method stubreturn price;}}Ford.javapackage Auto;public class Ford extends Auto{//抽象类不能实例化对象,不能声明为抽象类@Override//重写父类方法void setPrice(double price) {// TODO Auto-generated method stubthis.price = price;}double getPrice() {// TODO Auto-generated method stubreturn price;}}AutoTest.javapackage Auto;public class AutoTest {public static void main(String[] args) {// TODO Auto-generated method stubFord f = new Ford();Chevy c = new Chevy();f.setPrice(20000);c.setPrice(22000);System.out.println("A new Ford costs:"+f.getPrice());System.out.println("A new Chevy costs:"+c.getPrice());}}实验结果:Part3、附加题:Shape.javapackage Shape;public abstract class Shape {public Shape(){}public abstract double computePerimeter();public abstract double computeArea();public abstract String getType();}class Circle extends Shape{private double radius;public Circle(double radius){//super();this.radius = radius;}public double computePerimeter(){return Math.pow(radius, 2);}public double computeArea(){return Math.pow(radius, 2)*Math.PI;}public String getType(){return"Circle";}}class Rectangle extends Shape{private double length;private double wide;public Rectangle(double length,double wide){super();this.length = length;this.wide = wide;}public double computePerimeter(){return (length+wide)*2;}public double computeArea(){return length*wide;}public String getType(){return"Rectangle";}}class Triangle extends Shape{private double b1,b2,b3;public Triangle(double b1,double b2,double b3){ super();this.b1 = b1;this.b2 = b2;this.b3 = b3;}public double computePerimeter(){return b1+b2+b3;}public double computeArea(){double s = (b1+b2+b3)/2;return Math.sqrt(s*(s-b1)*(s-b2)*(s-b3));}public String getType(){return"Rectangle";}}ShapeInfo.javapackage Shape;public class ShapeInfo {public void printShapeInfo(Shape s){System.out.println("图像类型:"+s.getType());System.out.println("周长:"+putePerimeter());System.out.println("面积:"+puteArea());}}Test.javapackage Shape;public class Test {public static void main(String[] args) {// TODO Auto-generated method stubShape cir = new Circle(4);Shape rec = new Rectangle(5,8);Shape tri = new Triangle(6,6,6);Shape[] shape = new Shape[3];shape[0] = cir;shape[1] = rec;shape[2] = tri;ShapeInfo info = new ShapeInfo();for(Shape s : shape){i nfo.printShapeInfo(s);}}}实验结果:四、实验总结:通过本次实验,认识到了继承、父类、子类之间的关系,同时还学会了如何灵活运用抽象类,继承抽象类的子类必须对基类中的所有抽象方法进行重写,抽象类不能被实例化。

云南大学实验六运算器实验指导书剖析

云南大学实验六运算器实验指导书剖析

EL-JY-II计算机组成原理实验系统简介一、系统组成:EL-JY-II系统由两大部分组成:1、基板:本部分是8位机和16位机的公共部分,包括以下几个部分:1)数据输入和输出电路2)显示及监控电路3)脉冲源及时序电路4)数据和地址总线5)8255扩展实验电路6)单片机控制电路和键盘操作部分7)与PC机通讯的接口电路8)主存储器电路9)微代码输入及显示电路9)电源电路10)CPLD实验板(选件)11)自由实验区(面包板)2.CPU板:本板分为8位机和16位机两种,除数据总线和地址总线分别为8位和16位以外,都包括以下几个部分:1)微程序控制器2)运算器3)寄存器堆4)程序计数器5)指令寄存器6)指令译码电路7)地址寄存器8)数据和控制总线二、系统布局:系统布局分别见图1和图2。

三、使用说明及要求1.本系统分为三种实验操作方式:方式一:开关控制操作方式;方式二:键盘控制操作方式;方式三:PC机联机操作方式。

2.本系统采用正逻辑,即“1”代表高电平,“0”代表低电平;3.指示灯亮表示相应信号为高电平,熄灭表示相应信号为低电平;4.实验连线时应按如下方法:对于横排座,应使排线插头上的箭头面向自己插在横排座上;对于竖排座,应使排线插头上的箭头面向左边插在竖排座上;5.为保证实验的成功,每次实验之前均应认真阅读实验指导书,接线要按要求,确保正确无误且接触良好;6.应严格按照实验指导书的实验步骤和先后顺序进行实验,否则有可能造成实验不成功甚至损坏芯片。

方式一:开关控制操作方式:1.在各种控制信号中,有的是低电平有效,有的是高电平有效,请注意区别,具体可参见各个实验指导。

2.总线是计算机信息传输的公共通路。

为保证总线信息的正确无误,总线上每次只能有一个控制信号有效,如果同时有两个或两个以上同时有效,会产生总线竞争而造成错误甚至损坏芯片。

故每次开始实验操作时均要先使置所有控制开关电路的控制信号为“1”,高电平,对应的指示灯亮。

云南大学软件学院大物实验磁场

云南大学软件学院大物实验磁场

1 云南大学软件学院 实验报告
课程: 大学物理实验 学期: 2013-2014学年 第一学期 任课教师: 专业: 学号: 姓名: 成绩:
实验5 磁场
一、实验目的
通过计算机模拟速度选择器,研究恒稳磁场和静电场性质,验证速度、电场强度、磁感应强度 的关系。

二、实验内容
在本实验中预设带电粒子所带电荷q 与质量m 之比绝对值为1。

实验程序界面如下图:任意选 定10个速度,调整磁感应强度值与电场强度值,使带电粒子的运动轨迹为水平直线。

将运动轨迹为直线所对应的速度、磁感应强度、及电场强度数值填入下表中。

问题:
1、 该带电粒子带正电荷还是负电荷?为什么?
答:该粒子带正电;因为当磁场强度为0T 时,该粒子向下偏转,电场强度方向为y 轴负向。

2、 简要讨论速度值的大小对磁感应强度和电场强度的要求。

答:该带电粒子在复合场中运动时,所受合力为:qvB qE F F F m e +-=+=,所以当该粒子穿过恒稳磁场与静电场的复合场时,若要受力平衡,根据牛顿定律要求加速度为0,即)(E vB m q m F a -==,所以在受力平衡的时候,速度对于磁感应强度和电场强度的要求为:B E v =。

云南大学软件学院大物实验静电场

云南大学软件学院大物实验静电场

云南大学软件学院 实验报告课程: 大学物理实验 学期: 2013-2014学年 第一学期 任课教师: 专业: 学号: 姓名: 成绩:实验4 静电场一、 实验目的由实验给出的两个均匀带电的金属同心球壳配置,画出该同心球壳的电场及电势分布。

二、实验原理根据高斯定理推导出电场及电势的分布公式;利用数据分析软件,如Microsoft Excel 绘制电场及电势的分布图。

在如图所示的带电体中,因内球壳带电q 1,由于静电感应,外球壳的内表面上将均匀地分布电荷-q 1;根据电荷平衡原理,外球壳的外表面上所带电荷除了原来的q2外,还因为内表面感应了-q 1而生成+q 1,所以外球壳的外表面上将均匀分布电荷q 1+q 2。

在推导电场和电势分布公式时,须根据r 的变化范围分别讨论r < R 1、R 1 < r < R 2、R 2 < r < R 3、r > R 3几种情况。

场强分布: 当r < R 1时,001=⇒=⋅⎰⎰E dS E S当R 1 < r < R 2时,⇒=⋅⎰⎰01εq dS E S210241rq E επ=当R 2 < r < R 3时,003=⇒=⋅⎰⎰E dS E S当r > R 3时,2210402141rq q E q q dS E S+=⇒+=⋅⎰⎰επε电势分布:根据电势的定义,可以求得电势的分布。

当r < R 1时,3210210110143211414141332211R q q R q R q U drE dr E dr E dr E dr E U R R R R R R rr++-=⋅+⋅+⋅+⋅=⋅=⎰⎰⎰⎰⎰∞∞επεπεπ当R 1 < r < R 2时,321021010143214141413322R q q R q r q U drE dr E dr E dr E U R R R R rr++-=⋅+⋅+⋅=⋅=⎰⎰⎰⎰∞∞επεπεπ当R 2 < r < R 3时,321014314133R q q U drE dr E dr E U R R rr+=⋅+⋅=⋅=⎰⎰⎰∞∞επ当r > R 3时,rq q U drE dr E U rr21014141+=⋅=⋅=⎰⎰∞∞επ三、实验任务1.选取相关参数,截图如下:2、得到电场分布图和电势分布图:1)得到的电场分布图如下:2)得到的电势分布图如下:。

云南大学-软件学院--汇编实验5

云南大学-软件学院--汇编实验5

实验五 80x86分支,循环,子程序,宏程序设计姓名:学号:序号:班级:分数:1.编写设计一个2,10,16进制的码制转换程序,要求:①程序有友好的运行界面;②输入任意类型进制的数据,转换为其余两种进制类型;③要求程序有方便的输入输出功能;④要求程序能够处理基本的错误信息;⑤程序的基本结构采用子程序结构;源程序:.8086.model small.datastr db 0ah,0dh,'please input 1 to 8 to choise the function',0ah,0dhdb '1.btd',0ah,0dhdb '2.bth',0ah,0dhdb '3.dth',0ah,0dhdb '4.dtb',0ah,0dhdb '5.htb',0ah,0dhdb '6.htd',0ah,0dhdb '7.again',0ah,0dhdb '8.end',0ah,0dh,'$'b db 'Please input a Binary number',0ah,0dh,'$'d db 'Please input a decimal number',0ah,0dh,'$'h db 'Please input a Hexadecimal number',0ah,0dh,'$'agai db 'Please input again',0ah,0dh,'$'wr db 'A wrong number!',0ah,0dh,'$'num db 6,?,6 dup (?)num1 db 16,?,16 dup (?).codestart:mov ax,@datamov ds,axchoice:lea dx,strmov ah,9int 21hmov ah,1int 21hjmp C1mov ah,2int 21hmov dl,0dhmov ah,2int 21hjmp choiceMo: mov dx,offset agai mov ah,9int 21hjmp choiceC1: cmp al,'1'jnz C2call btdjmp againC2: cmp al,'2'jnz C3call bthjmp againC3: cmp al,'3'jnz C4call dthjmp againC4: cmp al,'4'jnz C5call dtbjmp againC5: cmp al,'5'jnz C6call htbjmp againC6: cmp al,'6'jnz C7call htdjmp againC7: cmp al,'7'jnz C8jmp Mojnz wrongen: mov ah,4chint 21hwrong:lea dx,wrmov ah,9int 21hjmp Mobtd procmov dx,offset bmov ah,9int 21hmov dx,offset num1mov ah,0ahint 21hmov dl,0ahmov ah,2int 21hmov dl,0dhmov ah,2int 21hmov di,offset num1mov ch,[di+1]zq2: mov dl,[di+2]cmp dl,39hjg zqsub dl,30hjmp zq1zq: sub dl,37hzq1: mov dh,0or bx,dxcmp ch,1jz zq3rol bx,1zq3: inc didec chjnz zq2jj1: cmp bx,10000 jc jjsub bx,10000inc sijmp jj1jj: mov dx,siand dx,0fhadd dl,30hmov ah,2int 21hxor si,siL1: cmp bx,1000jc L2sub bx,1000inc sijmp L1L2: mov dx,siand dx,0fhadd dl,30hmov ah,2int 21hxor si,siL3: cmp bx,100jc L4sub bx,100inc sijmp L3L4: mov dx,siand dx,0fhadd dl,30hmov ah,2int 21hxor si,siL5: cmp bx,10jc L6sub bx,10inc sijmp L5L6: mov dx,simov ah,2int 21hxor dx,dxmov dx,bxand dx,0fhadd dl,30hmov ah,2int 21hretbtd endpbth procmov dx,offset bmov ah,9int 21hmov dx,offset num1mov ah,0ahint 21hmov dl,0ahmov ah,2int 21hmov dl,0dhmov ah,2int 21hmov di,offset num1mov ch,[di+1]K1: mov al,[di+2]sub al,30hor bl,alrol bx,1inc didec chjnz K1ror bx,1mov ch,4mov cl,4K4: rol bx,clmov dl,bland dl,0fhadd dl,30hjmp K3K2: add dl,37hK3: mov ah,2int 21hdec chjnz K4retbth endpdth proclea dx,dmov ah,9int 21hmov dx,offset nummov ah,0ahint 21hmov dl,0ahmov ah,2int 21hmov dl,0dhmov ah,2int 21hmov di,offset nummov cl,[di+1]add di,2mov dl,[di]sub dl,30hmov al,10mul dlmov ch,0dec cxI: inc dimov dl,[di]sub dl,30hmov dh,0add ax,dxcmp cx,1jz I1mov bx,axI1: loop Imov bx,axmov si,offset nummov ch,[si+1]inc chinc chmov cl,4O: rol bx,clmov dl,bland dl,0fhcmp dl,9jg MMadd dl,30hjmp PPMM: add dl,37h PP: mov ah,2int 21hdec chjnz Oretdth endpdtb proclea dx,dmov ah,9int 21hmov dx,offset nummov ah,0ahint 21hmov dl,0ahmov ah,2int 21hmov dl,0dhmov ah,2int 21hmov di,offset nummov cl,[di+1]add di,2mov al,10mul dlmov ch,0dec cxc: inc dimov dl,[di]sub dl,30hmov dh,0add ax,dxcmp cx,1jz ccmov bx,10mul bxmov bx,axcc: dec cxjnz cmov bx,axmov cx,16x: rol bx,1mov dl,bland dl,01hadd dl,30hmov ah,2int 21hloop xretdtb endphtb procmov dx,offset hmov ah,9int 21hmov dx,offset nummov ah,0ahint 21hmov dl,0ahmov ah,2int 21hmov dl,0dhmov ah,2int 21hmov ch,[di+1]Z1: mov bl,[di+2]cmp bl,39hjg ZZsub bl,30hjmp ZXZZ: sub bl,37hZX: mov cl,4mov bh,4shl bl,clZ: rol bl,1mov dl,bland dl,01hadd dl,30hY: mov ah,2int 21hdec bhjnz Zinc didec chjnz Z1rethtb endphtd procmov dx,offset hmov ah,9int 21hmov dx,offset nummov ah,0ahint 21hmov dl,0ahmov ah,2int 21hmov dl,0dhmov ah,2int 21hmov di,offset nummov ch,[di+1]u2: mov dl,[di+2]sub dl,30hjmp u1u: sub dl,37h u1: mov dh,0or bx,dxcmp ch,1jz Rmov cl,4rol bx,cl R: inc didec chjnz u2xor si,sis1: cmp bx,1000jc s2sub bx,1000inc sijmp s1s2: mov dx,siand dx,0fhadd dl,30hmov ah,2int 21hxor si,sis3: cmp bx,100jc s4sub bx,100inc sijmp L3xor si,sis4: cmp bx,10jc s5sub bx,10inc sijmp s3s5: mov dx,siand dx,0fhadd dl,30hmov ah,2int 21hmov dx,bxand dx,0fhadd dl,30hmov ah,2int 21hrethtd endpend start实验结果:。

云南大学物理教学实验中心共25页文档

云南大学物理教学实验中心共25页文档

24
4
如果调节两极板间的电压U 可使重力和电场力 平衡,则有关系式:
f1
mgqEqU
f2
d
此时油滴会静止地悬浮在电场中,并保持平衡。
平行板不加电压时,油滴在空气中自由下落,下落 mg 过程中受三个力的作用:重力mg ;空气浮力f1 ;空气 对它的阻力f2。
24
5
由于表面张力的作用,油滴一般呈小球状。 设油滴的密度为ρ,半径为a,则油滴的质量m为:
a 9 2g
斯托克斯定律是以连续介质为前提的,对于半径小到
10-6m的微小油滴,半径与空气分子间的间隙大致相等
,已不能将空气看作连续介质,因此空气的粘滞系数修
改为:
' 1 b pa
斯托克斯定律修改为
f2
6 a 1 b
pa
最终可得:
3
2
q
18 2g
d U
tg
(1
L
b) p
2gtg 9L
计时显示 压反向开关,CCD和监视器等。
平衡水泡 CCD物距调节
计时键
10
油滴盒结构如图所示.油 滴盒是由两块经过精磨的 平行极板,上极板中央有 一个直径0.4毫米的小孔, 油滴从油雾室经油雾孔落 入小孔,进入上下极板之 间。油滴盒防风罩前装有 测量显微镜,用以观察平 行极板间的油滴。测量显 微镜目镜头中装有分划板, 其垂直总刻度相当于视场 中的0.3厘米,用以测量 油滴运动的距离。
24
11
用静态(平衡)法测定电子的电荷 要求:
1. 仪器调整 2. 练习控制油滴 3. 练习选择油滴 4. 测量(对同一油滴进行6—10次测量)
24
12
仪器调整
将仪器放平稳,调整左右两只调平螺栓,使水准泡指 示水平,这时平行极板处于水平状态。预热10分钟, 利用预热时间从测量显微镜中观察,如果分划板位置 不正,则转动目镜头,将分化板放正,目镜头要插到 底。调节24

云南大学软件学院大学物理实验报告六

云南大学软件学院大学物理实验报告六

云南大学软件学院 实验报告课程: 大学物理实验 学期: 2012-2013学年 第一学期 任课教师: 张德海 专业: 数字媒体技术 学号: 20111120248 姓名: 赵云涛 成绩:实验6 示波器一、 实验目的1.学会使用信号发生器。

2.学会用示波器观察波形以及测量电压、周期和频率。

二、 实验内容1.观察信号发生器波形2.测量正弦波电压在示波器上调节出大小适中、稳定的正弦波形,选择其中一个完整的波形,先测算出正弦波电压峰—峰值U p-p ,即:U p-p =(垂直距离DIV )×(档位V/DIV )×(探头衰减率)= 20.0v然后求出正弦波电压有效值U 为2U 71.0U p p -⨯== 7.1v3.测量正弦波周期和频率在示波器上调节出大小适中、稳定的正弦波形,选择其中一个完整的波形,先测算出正弦波的周期T ,即T =(水平距离DIV )×(档位t/DIV )= 150.0s然后求出正弦波的频率T f 1= = 0.0067 Hz 。

4.观察李萨如图形(1)将示波器的显示模式切换为A/B ,A 通道接到如图电路的位置1,调节信号发生器输出电压的频率为50Hz ;信号发生器2的输出端接到示波器B 通道,分别调节输出正弦波的频率为50Hz 、75Hz 、100Hz 、150Hz ,观察并记录各种李萨如图形。

(2)将示波器的显示模式切换为A/B ,A 通道接到如图电路的位置2,调节信号发生器输出电压的频率为50Hz ;信号发生器2的输出端接到示波器B 通道,分别调节输出正弦波的频率为50Hz 、75Hz 、100Hz 、150Hz ,观察并记录各种李萨如图形。

思考题1. 信号的幅值对李萨如图形有影响么?答:会影响到,李萨如图的形状会随两个信号的幅值以及位相不同而变化。

2. 要获得稳定的李萨如图形,两个信号的频率应符合什么样的关系?答:李萨如图上的每一个点都可以用以下的公式进行表示:X=A1sin(ω1t+ψ1) ,Y=A2sin(ω2t+ψ2) 。

实验1测量及误差分析

实验1测量及误差分析

大学物理实验指导书云南大学软件学院1. 课程基本信息名称:大学物理实验/College Physics Lab课程性质:学科基础总学时/学分: 32/12. 课程简介本实验课程根据教育部《非物理类理工学科大学物理实验课程教学基本要求》并结合软件学院人才培养目标开展教学。

本实验课程内容包括:∙测量误差的基础知识、用计算机处理实验数据的基本方法,以及基本物理量的测量方法,并加强数字化测量技术的应用。

∙结合软件学院的专业特点,通过计算机模拟和实际操作掌握误差分析方法、质点运动学、质点动力学、振动与波、电场、磁场、光的干涉与衍射等基本原理。

∙学习常用物理实验方法,实验室常用仪器的性能,常用实验操作技术及仪器正确调节,学习简单的计算机模拟。

3. 教学目的与基本要求本实验课培养学生初步掌握实验科学的思想和方法,提高其分析能力和创新能力;培养理论联系实际的科学作风,认真严谨的科学态度,积极主动的探索精神,团结协作的职业素养。

使之加深对物理学基本概念、基本理论的理解,掌握运用物理学基本原理分析和解决问题的科学方法。

能力培养基本要求∙独立实验能力——掌握实验原理及方法、正确使用仪器设备、独立完成实验内容、撰写合格的实验报告;∙分析与研究能力——融合实验原理、实验方法及相关理论知识对实验结果进行分析、判断、归纳与综合;∙理论联系实际能力——在实验中发现问题、分析问题并学习解决问题的科学方法;∙创新能力——进行初步的具有创意性内容的实验,激发学习主动性,逐步培养创新能力。

本实验课程要求学生∙掌握测量误差的基本知识、掌握用计算机处理实验数据的基本方法;∙掌握基本物理量的测量方法、了解数字化测量技术的应用;∙了解常用物理实验方法,掌握实验室常用仪器的性能,掌握常用实验操作技术及仪器正确调节;∙掌握简单计算机模拟的基本方法。

4. 考核方式和成绩评定办法单次实验成绩 = 10%出勤+40%实验结果+ 20%实验报告撰写质量+ 20%数据分析+10%程序运行或仪器操作实验综合成绩中各单次实验成绩比例项目比例(%)1 误差分析122 质点运动学153 质点动力学104 波的叠加85 示波器126 传感器87 静电场88 电量测量159 磁场 610 光的干涉与衍射 6合计1005. 参考文献(1)D.M.Bourg,游戏开发物理学, O’Reilly/电子工业出版社,2004.(2)上海交通大学物理实验中心,上海交通大学物理实验精品课程网:/ocw/reference.html(3)同济大学物理实验中心,物理实验教学大纲:/infopub/teach_info.asp#jxdg(4)复旦大学物理系,物理实验大纲,/phyteaching/undergraduate/syllabus/ (5)北京大学基础物理实验教学中心:http://162.105.21.182:8082/pechome/index.jsp6. 实验指导6.1测量及误差分析目的:测量数据的误差分析及其处理6.1.1测量与测量结果测量就是为确定被测对象的量值而进行的一系列操作,由测量所获得的结果称为测量结果。

云南大学实验六数据库完整性报告

云南大学实验六数据库完整性报告

云南大学软件学院实验报告课程:数据库原理与实用技术实验任课教师:刘宇、张璇姓名:学号:专业:信息安全成绩:实验6 数据库完整性实验6-1 完整性约束1、创建规则(用图形或者语句方法创建)(1)创建入学日期规则“Enter_University_date_rule”,假定该学校于1923年4月30日创建。

要求:入学日期必须大于等于学校创建日期,并且小于等于当前日期测试:(2)创建学生年龄规则“Age_rule”。

要求:学生年龄必须在15~30岁之间测试:(3)创建学生性别规则“Sex_rule”。

要求:性别只能为“男”或“女”测试:《数据库原理与实用技术》实验3 / 21(4)创建学生成绩规则“Score_rule ”。

要求:学生成绩只能在0~100之间(5)用图形方法查看学生成绩规则“Score_rule ”,截图为:双击:成绩:(6)用语句方法查看学生成绩规则“Score_rule ”,语句为:2、删除规则Enter_University_date_rule3、创建默认(用图形或者语句方法创建)(1)创建默认时间“Time_default”为当前系统时间(2)创建默认入学年龄“Age_default”为18岁(3)用图形方法查看默认入学年龄“Age_default”,截图为:《数据库原理与实用技术》实验5 /21(4)用语句方法查看默认入学年龄“Age_default ”,语句为:4、删除默认入学年龄“Age_default ”5、创建声明式默认:在创建表的过程中创建声明式默认 (1)创建表“default_example ”,表中包含字段pid 、name 、sex 、age 。

要求设定sex 的默认值为“男”、age 的默认值为18。

编号 姓名 性别 年龄 101 苏晴 女 201马拯山20执行结果为:输入数据:获取数据结果为:(2)在表中增加新的默认,将编号默认为100。

插入一条记录,执行结果为:6、在“学生管理数据库”各个数据表中建立相应的主键、外键、惟一值、以及check约束,要求:学生的年龄必须是两位数,其中第一位是1或2:学生表如下:《数据库原理与实用技术》实验授课表如下课程表如下:7/ 21成绩表如下:删除check 约束:学生表的:《数据库原理与实用技术》实验9/21授课表的:课程表的:成绩表的:7、完成教科书456页如下习题:[7.1]a:实验6-2 触发器《数据库原理与实用技术》实验11 / 211、使用触发器(1)创建一个触发器trig_update ,返回对“学生表”进行更新操作后,被更新的记录条数(2)执行触发器(3)修改触发器trig_update ,除返回被更新的记录条数外,再返回学生的所有基本信息2、使用触发器的两个特殊表:插入表(inserted)和删除表(deleted)。

云南大学--软件学院--大学物理实验2

云南大学--软件学院--大学物理实验2
云南大学软件学院实验报告
课程:大学物理实验学期:2009-2010学年第一学期任课教师:
班级:学号:序号: 姓名:成绩:
实验2质点运动学
一、实验内容1
1.证明公式: ,有关各个变量的定义见实验内容。
2.设定并记录发现目标距离、目标飞行高度、目标飞行速度;
发现目标距离
目标飞行高度
目标飞行速度
10000
11.45
11.44
11.43
11.42
11.423
水平误差
(米)Biblioteka 154.6137.4120.2
114.2
68.7
25.3
16.2
7.1
-2.0
1.0
观察角2= 16.820(度)
实验
1
2
3
4
5
6
7
8
9
10
发射角
(度)
33.5
33.3
32.9
32.7
32.3
32
31.9
31.5
31.4
31
水平误差
(米)
1000
500
3.根据程序显示的不同观察角,选定10个不同的拦截发射角,记录各个拦截发射角对应的拦截弹头与目标的水平误差;并分析拦截发射角等于多少,水平误差最小?记录2个不同观测角的情况。
观察角1= 5.834度)
实验
1
2
3
4
5
6
7
8
9
10
发射角
(度)
11.6
11.58
11.56
11.555
11.5
177.0
156.1
112.3
88.6

大学物理实验报告数据处理及误差分析

大学物理实验报告数据处理及误差分析
在不同测量条件下进行的一系列测量,例如不同的人员,使用不同的仪器,采用不同的方法进行测量,则各次测量结果的可靠程度自然也不相同,这样的测量称为不等精度测量。处理不等精度测量的结果时,需要根据每个测量值的“权重”,进行“加权平均”,因此在一般物理实验中很少采用。
等精度测量的误差分析和数据处理比较容易,下面所介绍的误差和数据处理知识都是针对等精度测量的。
按照测量值获得方法的不同,测量分为直接测量和间接测量两种。
直接从仪器或量具上读出待测量的大小,称为直接测量。例如,用米尺测物体的长度,用秒表测时间间隔,用天平测物体的质量等都是直接测量,相应的被测物理量称为直接测量量。
如果待测量的量值是由若干个直接测量量经过一定的函数运算后才获得的,则称为间接测量。例如,先直接测出铁圆柱体的质量m、直径D和高度h,再根据公式??4m计算出铁的的密度2?Dh
3实验报告
实验报告是实验工作的总结。要用简明的形式将实验报告完整而又准确地表达出来。实验报告要求文字通顺,字迹端正,图表规矩,结果正确,讨论认真。应养成实验完后尽早写出实验报告的习惯,因为这样做可以收到事半功倍的效果。
完整的实验报告应包括下述几部分内容:数据表格在实验报告纸上设计好合理的表格,将原始数据整理后填入表格之中(有老师签名的原始数据记录纸要附在本次报告一起交)。数据处理根据测量数据,可采用列表和作图法(用坐标纸),对所得的数据进行分析。按照实验要求计算待测的量值、绝对误差及相对误差。书写在报告上的计算过程应是:公式→代入数据→结果,中间计算可以不写,绝对不能写成:公式→结果,或只写结果。而对误差的计算应是:先列出各单项误差,按如下步骤书写,公式→代入数据→用百分数书写的结果。结果表达按下面格式写出最后结果:
仪器因素由于仪器本身的固有缺陷或没有按规定条件调整到位而引起误差。例如,仪器标尺的刻度不准确,零点没有调准,等臂天平的臂长不等,砝码不准,测量显微镜精密螺杆存在回程差,或仪器没有放水平,偏心、定向不准等。

云南大学软件学院信息安全工程实验6剖析

云南大学软件学院信息安全工程实验6剖析

云南大学软件学院实验报告课程:信息安全工程实验任课教师:林英姓名:学号:专业:成绩:实验6.防火墙实验一、实验目的:通过实验理解入防火墙的功能和工作原理,学习NAT转换原理,熟悉NAT在一般网络环境中的应用、Linux系统中iptables防火墙以及Windows防火墙的配置和使用。

二、实验原理NAT转换实验:网络地址转换(NAT,Network Address Translation)是Internet 工程任务组(IETF,Internet Engineering Task Force)的一个标准,是把内部私有IP地址转换成合法网络IP地址的技术,允许一个整体机构以一个公用IP地址出现在Internet上。

IPtables防火墙配置实验:IPtables是复杂的,它集成到linux内核中。

用户通过IPtables,可以对进出你的计算机的数据包进行过滤。

通过IPtables命令设置你的规则,来把守你的计算机网络──哪些数据允许通过,哪些不能通过,哪些通过的数据进行记录(log)。

Windows防火墙实验:Windows防火墙是一个基于主机的状态防火墙,它丢弃所有未请求的传入流量,即那些既没有对应于为响应计算机的某个请求而发送的流量(请求的流量),也没有对应于已指定为允许的未请求的流量(异常流量)。

Windows防火墙提供某种程度的保护,避免那些依赖未请求的传入流量来攻击网络上的计算机的恶意用户和程序。

三、实验步骤NAT转换实验一、连接防火墙服务器,开始实验启动实验客户端,选择“防火墙”中的“NAT转换实验”,点击“连接”。

连接成功后,会提示连接成功,主界面会显示连接IP信息及防火墙规则操作画面。

二、添加静态路由打开本地主机cmd命令行,输入route add 172.21.0.0 mask 255.255.0.0 172.20.2.1,添加路由。

三、验证网络连通性输入ping 172.21.3.76,如图所示。

云南大学软件学院数据结构实验6

云南大学软件学院数据结构实验6

云南大学软件学院数据结构实验6预览说明:预览图片所展示的格式为文档的源格式展示,下载源文件没有水印,内容可编辑和复制实验难度:A □ B □ C □学期:2017秋季学期任课教师:实验题目:组员及组长:承担工作:联系电话:电子邮件:完成提交时间:年月日一、【实验构思(Conceive)】(10%)(本部分应包括:描述实验实现的基本思路,包括所用到的离散数学、工程数学、程序设计等相关知识,对问题进行概要性地分析)1.基本思路:用无向网表示校区内的各建筑的平面图,图中顶点表示主要建筑,存放建筑的编号、名称、简介等信息,图中的边表示建筑间的道路,存放路径长度等信息,将导游图看作一张带权无向图,顶点表示校园的各个建筑,边表示各建筑之间的道路,边上的权值表示距离;根据用户的输入信息用迪杰斯特拉算法计算出任意两个地点之间的最短路径,并用二维数组来存储相关的信息,输出给用户;同时用数组存储各个地点的相关信息,当用户输入要了解的地点名称是,调用相关函数输出该地点的相关信息给用户。

2、在程序中运用到了图的相关知识以及迪杰斯特拉算法和哈密尔顿图的遍历等,无向图的相关知识和相关操作,还有图的存储及相关的数据结构。

二、【实验设计(Design)】(20%)(本部分应包括:抽象数据类型的定义和基本操作说明,程序包含的模块以及各模块间的调用关系,关键算法伪码描述及程序流程图等,如有界面则需包括界面设计,功能说明等)主程序模块:该模块包含一个main函数,在main函数中调用其他函数和子程序。

int main(){int v0, v1;int i, num;char flag;Create(NUM, 11);do{flag = Menu();switch (flag){case'1':system("cls");//清空屏幕的当前内容List();//输出景点列表printf("\请选择起点景点(0~26):");scanf("%d", &v0);printf("\请选择终点景点(0~26):");scanf("%d", &v1);ShortPath(v0);//求出最短路径Output(v0, v1);//输出结果printf("\请按任意键继续...\");getchar();//利用getchar()函数让程序运行到上一行时,等待下下一个按键时才返回getchar();break;system("cls");List();printf("\请输入您要查找的景点编号:"); scanf("%d", &num);for (i = 0; i<="" p="">{if (num == g.vex[i].number){printf("\你要查找的景点信息如下:"); printf("\%s:", g.vex[i].sight);printf("%s\\", g.vex[i].description); printf("\按任意键返回...");getchar();getchar();break;}}if (i == NUM){printf("\没有找到!");printf("\按任意键返回...");getchar();getchar();}break;case'e':exit(0);}} while (flag != '0');}流程图:子程序模块包括:地点列表函数、输出函数、哈密尔顿图的遍历函数、迪杰斯特拉算法判断最短路径函数、创建图的函数。

云南大学软件学院计算机网络原理实验六实验报告3

云南大学软件学院计算机网络原理实验六实验报告3

实验六、传输层可靠传输协议GBN编程实验报告序号:姓名:学号:成绩指导老师:一、实验目的:1、通过编写实现一个简单可靠的数据传输协议GBN的发送和接收代码,模拟可靠数据传输2、理解TCP协议可靠传输的差错检测、重传、累计确认、定时器的可靠传输策略。

二、实验指导:参考教材。

动画演示:三、实验要求:编程实现一个GBN传输协议的发送方和接收方两程序,采用编程语言不限,要求能将发送――接收流程以及处理方法表现出来.1.实验流程图如下:N2.实验截图与代码如下: 截图: 传送下一个数据包结束代码及注释:一、GBN.h#pragma once#include <stdio.h>//基础功能模块的数据结构声明#define BIDIRECTIONAL 1 /* change to 1 if you're doing extra credit andwrite a routine called B_output *//* a "msg" is the data unit passed from layer 5 (teachers code) to layer4 (students' code). It contains the data (characters) to be delivered tolayer 5 via the students transport level protocol entities. */struct msg{ char data[20];};/* a packet is the data unit passed from layer 4 (students code) to layer3 (teachers code). Note the pre-defined packet structure, which allstudents must follow. */struct pkt{int seqnum;int acknum;int checksum;char payload[20];};#define WINDOWSIZE 8#define MAXBUFSIZE 50#define RTT 15.0#define NOTUSED 0#define NACK -1#define TRUE 1#define FALSE 0#define A 0#define B 1//网络仿真部分数据结构声明***********************************************************struct event{float evtime; /* event time */int evtype; /* event type code */int eventity; /* entity where event occurs */struct pkt *pktptr; /* ptr to packet (if any) assoc w/ this event */ struct event *prev;struct event *next;};/* possible events: */#define TIMER_INTERRUPT 0#define FROM_LAYER5 1#define FROM_LAYER3 2#define OFF 0#define ON 1//基础功能模块的函数声明******************************************************************* void ComputeChecksum(struct pkt *packet);//计算校验和int CheckCorrupted(struct pkt packet);//检查数据是否出错void A_output( struct msg message);//A端向外发送数据void A_input(struct pkt packet);//A端接收数据void A_timerinterrupt();//A计时器超时void A_init();//A端初始化void B_output(struct msg message);void B_input(struct pkt packet);void B_timerinterrupt();void B_init();//网络仿真部分的函数声明**************************************************void init(); //初始化仿真器float jimsrand();//随机数发生器[0,1]//处理事件列表部分的函数声明*********************************************void generate_next_arrival();//产生下一个到达的分组void insertevent(struct event *p);//向事件列表中插入一条新的事件void printevlist();//打印事件列表//******************************************************************** //**********************计时器模块*********************************** void stoptimer(int);//停止计时器void starttimer(int,float);//启动计时器//******************************************************************** *//**************************网络各层之间传送模块***********************void tolayer3(int AorB,struct pkt packet);//向第3层发送信息void tolayer5(int AorB,char datasent[20]);//向第5层发送信息二、GBN.c#include "GBN.h"#include <stdio.h>#include <string.h>#include <stdlib.h>extern int TRACE = 1; /* for my debugging */为我的调试extern int nsim = 0; /* number of messages from 5 to 4 so far */目前为止信息的数字是从5到4extern int nsimmax = 0; /* number of msgs to generate, then stop */如果信息产生的数字为0,然后就停止extern float time = 0.000;float lossprob; /* probability that a packet is dropped */数据包可能会丢失float corruptprob; /* probability that one bit is packet is flipped*/这一点的数据包可能会被弹出去float lambda; /* arrival rate of messages from layer 5 */ 第五层到达的信息的次序int ntolayer3; /* number sent into layer 3 */被传送到第三层的数据static int nlost = 0; /* number lost in media */在媒介中数据丢失static int ncorrupt = 0; /* number co rrupted by media*/被媒介毁坏的数据static int expectedseqnum = 0; /* expected se quence number at receiver side */在接收者这边接收到预期的序列数据static int nextseqnum; /* next sequence number to use in sender side */下一个序列数据使用在发送者这边static int base; /* t he head of sender window */发送者的头窗口struct pkt winbuf[WINDOWSIZE]; /* window packets buffer */数据包缓冲区窗口static int winfront,winrear; /* front and rear points of wind ow buffer */窗口缓冲区的前方点和后方点static int pktnum; /* packet number of window buffer */窗口缓冲区的数据包个数struct msg buffer[MAXBUFSIZE]; /* sender message buffer */发送消息缓冲区int buffront,bufrear; /* front and rear pointers of buffer */缓冲区的前指针与后指针static int msgnum; /* message number of buffer */信息数量的缓冲int packet_lost =0;int packet_corrupt=0;int packet_sent =0;extern int packet_correct=0;extern int packet_resent =0;int packet_timeout=0;extern struct event *evlist = NULL; /* the event list *///计算校验和void ComputeChecksum( struct pkt *packet){int checksum;int i;checksum = packet->seqnum;checksum = checksum + packet->acknum;for ( i=0; i<20; i++ )checksum = checksum + (int)(packet->payload[i]);checksum = 0-checksum;packet->checksum = checksum;}//检查是否出错int CheckCorrupted(struct pkt packet){int checksum;int i;checksum = packet.seqnum;checksum = checksum + packet.acknum;for ( i=0; i<20; i++ )checksum = checksum + (int)(packet.payload[i]);if ( (packet.checksum+checksum) == 0 )return (FALSE);elsereturn (TRUE);}//A端向外发送数据/* called from layer 5, passed the data to be sent to other side */ void A_output(struct msg message){int i;struct pkt sendpkt;/* if window is not full */if ( nextseqnum < base+WINDOWSIZE ){printf("----A: New message arrives, send window is not full, send new messge to layer3!\n");/* create packet */sendpkt.seqnum = nextseqnum;sendpkt.acknum = NOTUSED;for ( i=0; i<20 ; i++ )sendpkt.payload[i] = message.data[i];/* computer checksum */ComputeChecksum (&sendpkt);/* send out packet */tolayer3 (A, sendpkt);/* copy the packet to window packet buffer */winrear = (winrear+1)%WINDOWSIZE;pktnum ++;winbuf[winrear] = sendpkt;for (i=0; i<20; i++)winbuf[winrear].payload[i]= sendpkt.payload[i];/* update state variables */nextseqnum = nextseqnum+1;starttimer(A,RTT);B_input(sendpkt);A_input(sendpkt);}/* if window is full */else{printf("----A: New message arrives, send window is full,");/* if buffer full, give up and exit*/if ( msgnum == MAXBUFSIZE){printf (" Error: Sender buffer is full! \n");exit (1);}/* otherwise, buffer the message */else{printf("buffer new message!\n");bufrear = (bufrear+1) % MAXBUFSIZE;for (i=0; i<20; i++)buffer[bufrear].data[i] = message.data[i];msgnum ++;}}}//B端向外发送数据/* called from layer 5, passed the data to be sent to other side */ void B_output(struct msg message){int i;struct pkt sendpkt;/* if window is not full */if ( nextseqnum < base+WINDOWSIZE ){printf("----A: New message arrives, send window is not full, send new messge to layer3!\n");/* create packet */sendpkt.seqnum = nextseqnum;sendpkt.acknum = NOTUSED;for ( i=0; i<20 ; i++ )sendpkt.payload[i] = message.data[i];/* computer checksum */ComputeChecksum (&sendpkt);/* send out packet */tolayer3 (A, sendpkt);A_input(sendpkt);/* copy the packet to window packet buffer */winrear = (winrear+1)%WINDOWSIZE;pktnum ++;winbuf[winrear] = sendpkt;for (i=0; i<20; i++)winbuf[winrear].payload[i]= sendpkt.payload[i];/* if it is the first packet in window, start timeout */ //if ( base == nextseqnum )//{//starttimer(A,RTT);//printf("----A: start a new timer!\n");// }/* update state variables */nextseqnum = nextseqnum+1;}/* if window is full */else{printf("----A: New message arrives, send window is full,");/* if buffer full, give up and exit*/if ( msgnum == MAXBUFSIZE){printf (" Error: Sender buffer is full! \n");exit (1);}/* otherwise, buffer the message */else{printf("buffer new message!\n");bufrear = (bufrear+1) % MAXBUFSIZE;for (i=0; i<20; i++)buffer[bufrear].data[i] = message.data[i];msgnum ++;}}}//A端接收数据void A_input(struct pkt packet){struct pkt sendpkt;int i;/* if received packet is not corrupted and ACK is received */if ( (CheckCorrupted(packet) == FALSE) && (packet.acknum != NACK) ) {printf("----A: ACK %d is correctly received,",packet.acknum);packet_correct++;/* delete the acked packets from window buffer */winfront = (winfront+(packet.acknum+1-base)) % WINDOWSIZE; pktnum = pktnum - (packet.acknum+1-base);/* move window base */base = packet.acknum+1;stoptimer(A);if ( base < nextseqnum){//starttimer(A,RTT);printf ("\n\n\nsend new packets!");}/* if buffer is not empty, send new packets */while ( (msgnum!=0) && (nextseqnum<base+WINDOWSIZE) ) {/* create packet */sendpkt.seqnum = nextseqnum;sendpkt.acknum = NOTUSED;buffront = (buffront+1) % MAXBUFSIZE;for ( i=0; i<20 ; i++ )sendpkt.payload[i] = buffer[buffront].data[i];/* computer checksum */ComputeChecksum (&sendpkt);/* if it is the first packet in window, start timeout */if ( base == nextseqnum ){//starttimer(A,RTT);printf ("send new packets!\n");}/* send out packet */tolayer3 (A, sendpkt);/* copy the packet to window packet buffer */winrear = (winrear+1)%WINDOWSIZE;winbuf[winrear] = sendpkt;pktnum ++;/* update state variables */nextseqnum = nextseqnum+1;/* delete message from buffer */msgnum --;}}elseprintf ("----A: NACK is received, do nothing!\n");}//B端接收数据*****************************************************一定要调用这个/* Note that with simplex transfer from a-to-B, there is no B_output() */ /* called from layer 3, when a packet arrives for layer 4 at B*/void B_input(struct pkt packet){struct pkt sendpkt;int i;/* if not corrupted and received packet is in order */if ( (CheckCorrupted(packet) == FALSE) && (packet.seqnum == expectedseqnum)){printf("\n----B: packet %d is correctly received, send ACK!\n",packet.seqnum);/* send an ACK for the received packet *//* create packet */sendpkt.seqnum = NOTUSED;sendpkt.acknum = expectedseqnum;for ( i=0; i<20 ; i++ )sendpkt.payload[i] = '0';/* computer checksum */ComputeChecksum (&sendpkt);/* send out packet *///tolayer3 (B, sendpkt);/* update state variables */expectedseqnum = expectedseqnum+1;printf("----B:expectedseqnum = %d\n",expectedseqnum);/* deliver received packet to layer 5 *///tolayer5(B,packet.payload);}/* otherwise, discard the packet and send a NACK */else{printf("----B: packet %d is corrupted or not I expects, send NACK!\n",packet.seqnum);/* create packet */sendpkt.seqnum = NOTUSED;sendpkt.acknum = NACK;for ( i=0; i<20 ; i++ )sendpkt.payload[i] = '0';/* computer checksum */ComputeChecksum (&sendpkt);/* send out packet */tolayer3 (B, sendpkt);}}//A计时器超时/* called when A's timer goes off */void A_timerinterrupt(){int i;printf("----A: time out,resend packets!\n");/* start timer */starttimer(A,RTT);/* resend all packets not acked */for ( i=1; i<=pktnum; i++ ){packet_resent++;tolayer3(A,winbuf[(winfront+i)%WINDOWSIZE]);}}//B计时器超时/* called when B's timer goes off */void B_timerinterrupt(){int i;printf("----B: time out,resend packets!\n");/* start timer */starttimer(B,RTT);/* resend all packets not acked */for ( i=1; i<=pktnum; i++ ){packet_resent++;tolayer3(B,winbuf[(winfront+i)%WINDOWSIZE]);}}//A端初始化/* entity A routines are called. You can use it to do any initialization */void A_init()base = 0;nextseqnum = 0;buffront = 0;bufrear = 0;msgnum = 0;winfront = 0;winrear = 0;pktnum = 0;}//B端初始化/* entity B routines are called. You can use it to do any initialization */void B_init(){expectedseqnum = 0;}//初始化仿真器void init() /* initialize the simulator */{int i;float sum, avg;float jimsrand();FILE *fp;fp = fopen ("parameter.txt","r");printf("----- Stop and Wait Network Simulator Version 1.1 -------- \n\n");printf("Enter the number of messages to simulate: ");//fscanf(fp,"%d",&nsimmax);scanf("%d",&nsimmax);printf("\nEnter packet loss probability [enter 0.0 for no loss]: "); //fscanf(fp, "%f",&lossprob);scanf("%f",&lossprob);printf("\nEnter packet corruption probability [0.0 for no corruption]: "); //fscanf(fp,"%f",&corruptprob);scanf("%f",&corruptprob);printf("\nEnter average time between messages from sender's layer5 [ > 0.0]: ");//fscanf(fp,"%f",&lambda);scanf("%f",&lambda);printf("\nEnter TRACE: ");//fscanf(fp,"%d",&TRACE);scanf("%d",&TRACE);printf("\n\n");srand(9999); /* init random number generator */sum = 0.0; /* test random number generator for students */for (i=0; i<1000; i++)sum=sum+jimsrand(); /* jimsrand() should be uniform in [0,1] */avg = sum/1000.0;/*if(avg < 0.25 || avg > 0.75){printf("It is likely that random number generation on your machine\n" ); printf("is different from what this emulator expects. Please take\n"); printf("a look at the routine jimsrand() in the emulator code. Sorry. \n");exit(0);}*/printf("%f",avg);ntolayer3 = 0;nlost = 0;ncorrupt = 0;time=0.0; /* initialize time to 0.0 */generate_next_arrival(); /* initialize event list */}//随机数发生器float jimsrand(){double mmm = 2147483647; /* largest int - MACHINE DEPENDENT */float x; /* individual students may need to change mmm */x = rand()/mmm; /* x should be uniform in [0,1] */return(x);}//**************************************************************************************//*******************************事件处理部分*******************************************void generate_next_arrival(){double x,log(),ceil();struct event *evptr;float ttime;int tempint;//if (TRACE>2)//printf("-----------------GENERATE NEXT ARRIVAL: creating new arrival\n");x = lambda*jimsrand()*2; /* x is uniform on [0,2*lambda] *//* having mean of lambda */evptr = (struct event *)malloc(sizeof(struct event));evptr->evtime = time + x;evptr->evtype = FROM_LAYER5;if (jimsrand()<0.5){evptr->eventity = A;}evptr->eventity = B;insertevent(evptr);}//向事件列表中插入一条新的事件void insertevent(struct event *p){struct event *q,*qold;if (TRACE>2){//printf(" INSERTEVENT: time is %lf\n",time);//printf(" INSERTEVENT: future time will be %lf\n",p->evtime);}q = evlist; /* q points to front of list in which p struct inserted */if (q==NULL)/* list is empty */{evlist=p;p->next=NULL;p->prev=NULL;}else{for (qold = q; q !=NULL && p->evtime > q->evtime; q=q->next) qold=q;if (q==NULL)/* end of list */{qold->next = p;p->prev = qold;p->next = NULL;}else if (q==evlist)/* front of list */p->next=evlist;p->prev=NULL;p->next->prev=p;evlist = p;}else /* middle of list */{p->next=q;p->prev=q->prev;q->prev->next=p;q->prev=p;}}}//打印事件列表void printevlist(){struct event *q;int i;printf("--------------\nEvent List Follows:\n");for(q = evlist; q!=NULL; q=q->next){printf("Event time: %f, type: %d entity: %d\n",q->evtime,q->evtype,q->eventity);}printf("--------------\n");}//启动计时器void starttimer(int AorB,float increment){struct event *q;struct event *evptr;if (TRACE>2)printf("\n----A: START TIMER: starting timer at %f\n",time);/* be nice: check to see if timer is already started, if so, then warn *//* for (q=evlist; q!=NULL && q->next!=NULL; q = q->next) */for (q=evlist; q!=NULL ; q = q->next)if ( (q->evtype==TIMER_INTERRUPT && q->eventity==AorB) ){//printf("Warning: attempt to start a timer that is already started\n");return;}/* create future event for when timer goes off */evptr = (struct event *)malloc(sizeof(struct event));evptr->evtime = time + increment;evptr->evtype = TIMER_INTERRUPT;evptr->eventity = AorB;insertevent(evptr);}//停止计时器/* called by students routine to cancel a previously-started timer */ void stoptimer(int AorB) /* A or B is trying to stop timer */{struct event *q,*qold;if (TRACE>2)printf("\n----A: STOP TIMER: stopping timer\n");/* for (q=evlist; q!=NULL && q->next!=NULL; q = q->next) */for (q=evlist; q!=NULL ; q = q->next)if ( (q->evtype==TIMER_INTERRUPT && q->eventity==AorB) )/* remove this event */{if (q->next==NULL && q->prev==NULL)evlist=NULL; /* remove first and only event on listelse if (q->next==NULL) /* end of list - there is one in front */ q->prev->next = NULL;else if (q==evlist) /* front of list - there must be event after */{q->next->prev=NULL;evlist = q->next;}else /* middle of list */{q->next->prev = q->prev;q->prev->next = q->next;}free(q);return;}//printf("Warning: unable to cancel your timer. It wasn't running.\n");}//向第三层发送信息/************************** TOLAYER3 ***************/void tolayer3(int AorB,struct pkt packet){struct pkt *mypktptr;struct event *evptr,*q;float lastime, x, jimsrand();int i;ntolayer3++;/* simulate losses: */if (jimsrand() < lossprob){nlost++;if (TRACE>0)printf(" TOLAYER3: packet being lost\n");return;}/* make a copy of the packet student just gave me since he/she may decide *//* to do something with the packet after we return back to him/her */ mypktptr = (struct pkt *)malloc(sizeof(struct pkt));mypktptr->seqnum = packet.seqnum;mypktptr->acknum = packet.acknum;mypktptr->checksum = packet.checksum;for (i=0; i<20; i++)mypktptr->payload[i] = packet.payload[i];if (TRACE>2){printf(" TOLAYER3: seq: %d, ack %d, check: %d ", mypktptr->seqnum,mypktptr->acknum, mypktptr->checksum);for (i=0; i<20; i++)printf("%c",mypktptr->payload[i]);printf("");}/* create future event for arrival of packet at the other side */evptr = (struct event *)malloc(sizeof(struct event));evptr->evtype = FROM_LAYER3; /* packet will pop out from layer3 */ evptr->eventity = (AorB) % 2; /* event occurs at other entity */evptr->pktptr = mypktptr; /* save ptr to my copy of packet *//* finally, compute the arrival time of packet at the other end. medium can not reorder, so make sure packet arrives between 1 and 10 time units after the latest arrival time of packetscurrently in the medium on their way to the destination */lastime = time;/* for (q=evlist; q!=NULL && q->next!=NULL; q = q->next) */for (q=evlist; q!=NULL ; q = q->next)if ( (q->evtype==FROM_LAYER3 && q->eventity==evptr->eventity) ) lastime = q->evtime;evptr->evtime = lastime + 1 + 9*jimsrand();/* simulate corruption: */if (jimsrand() < corruptprob){ncorrupt++;if ( (x = jimsrand()) < .75)mypktptr->payload[0]='Z'; /* corrupt payload */else if (x < .875)mypktptr->seqnum = 999999;elsemypktptr->acknum = 999999;if (TRACE>0)printf(" TOLAYER3: packet being corrupted\n");}//if (TRACE>2)//printf(" TOLAYER3: scheduling arrival on other side\n");insertevent(evptr);}//向第五层发送信息/************************** TOLAYER5 ***************/void tolayer5(int AorB,char datasent[20]){int i;if (TRACE>2){printf(" TOLAYER5: data received: ");for (i=0; i<20; i++)printf("%c",datasent[i]);printf("\n");}}三、GBN-CS.c#include "GBN.h"#include <stdio.h>#include <string.h>#include <stdlib.h>extern int TRACE ; /* for my debugging */extern int nsim ; /* number of messages from 5 to 4 so far */extern int nsimmax; /* number of msgs to generate, then stop */extern float time;extern int packet_correct;extern int packet_resent;extern struct event *evlist;int main(){struct event *eventptr;struct msg msg2give;struct pkt pkt2give;int i,j;char c;init();A_init();B_init();while (1){eventptr = evlist; /* get next event to simulate */ if (eventptr==NULL)goto terminate;evlist = evlist->next; /* remove this event from event list */if (evlist!=NULL)evlist->prev=NULL;if (TRACE >= 2){printf("\nEVENT time: %f,",eventptr->evtime);printf(" type: %d",eventptr->evtype);if (eventptr->evtype==0)printf(", timerinterrupt ");else if (eventptr->evtype==1)printf(", fromlayer5 ");elseprintf(", fromlayer3 ");printf(" entity: %d\n",eventptr->eventity);}time = eventptr->evtime; /* update time to next event time*/if (nsim==nsimmax)break; /* all done with simulation */if (eventptr->evtype == FROM_LAYER5 ){generate_next_arrival(); /* set up future arrival *//* fill in msg to give with string of same letter */j = nsim % 26;for (i=0; i<20; i++)msg2give.data[i] = 97 + j;if (TRACE>2){printf(" MAINLOOP: data given to student: ");for (i=0; i<20; i++)printf("%c", msg2give.data[i]);printf("\n");}nsim++;if (eventptr->eventity == A){A_output(msg2give);}else{B_output(msg2give);}}else if (eventptr->evtype == FROM_LAYER3){pkt2give.seqnum = eventptr->pktptr->seqnum;pkt2give.acknum = eventptr->pktptr->acknum;pkt2give.checksum = eventptr->pktptr->checksum;for (i=0; i<20; i++)pkt2give.payload[i] = eventptr->pktptr->payload[i];if (eventptr->eventity == A) /* deliver packet by calling */ A_input(pkt2give); /* appropriate entity */elseB_input(pkt2give);free(eventptr->pktptr); /* free the memory for packet */ }else if (eventptr->evtype == TIMER_INTERRUPT){if (eventptr->eventity == A)A_timerinterrupt();elseB_timerinterrupt();}else{printf("INTERNAL PANIC: unknown event type \n");}free(eventptr);}terminate:printf(" Simulator terminated at time %f\n after sending %d msgs from layer5\n",time,nsim);printf(" correctly sent pkts: %d \n", packet_correct);printf(" resent pkts: %d \n", packet_resent);system("pause");}附源代码及注释四. 实验小结通过本次试验了解了编程实现简单可靠的数据传输GBN协议,模拟了可靠数据传输理解了TCP协议可靠传输的差错检测、重传、累计确认、定时器的可靠传输策略。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

云南大学软件学院 实验报告课程: 大学物理实验 学期: 2011-2012学年 第一学期 任课教师: 王逍 班级: 软件工程 学号: 20111120012 序号: 3 姓名: 武琼 成绩: 实验6 简谐振动的合成一、 同方向同频率简谐振动的合成两个简谐振动的方程为 使用matlab 编写程序,求x1,x2,合振动的波形,讨论相位差对合成振动的影响。

相位差至少讨论4中情况(1.为0°;2.为180°;3.小于180°;4.大于180°),要求所有波形画在同一个figure 中。

()()⎩⎨⎧+=+=222111cos cos ϕωϕωt A x t A x二、相互垂直方向同频率简谐振动的合成两个简谐振动的方程为使用matlab 编写程序,求x,y,合振动的波形,讨论相位差对合成振动的影响。

相位差至少讨论4中情况(1.为0°;2.为180°;3.小于180°;4.大于180°),要求所有波形画在同一个figure 中。

()()⎩⎨⎧+=+=y y x x t A y t A x ϕωϕωcos cos三、相互垂直方向不同频率简谐振动的合成(李萨如图形)使用matlab编写程序,画李萨如图形,要求:1.至少4种频率比2.至少8种相位差3.所有图形画在同一个figure中,添加标注。

代码:cleart = -4:0.01:4;Ax = 1;Ay = 3;w1 = 1; w2 = 1./2;w3 = 2./3;w4 = 3./4;w5 = 2./5;m0 = 0;m1 = 0;m2 = pi./4;m3 = pi./2;m4 = 3.*pi./4;m5 = pi;m6 = 5.*pi./4; m7 =3.*pi./2;m8 = 7.*pi./4; x0 = Ax.*cos(2.*pi*t+m0);y11 = Ay.*cos(2.*w1.*pi*t+m1);y12 = Ay.*cos(2.*w1.*pi*t+m2);y13 = Ay.*cos(2.*w1.*pi*t+m3);y14 = Ay.*cos(2.*w1.*pi*t+m4);y15 = Ay.*cos(2.*w1.*pi*t+m5);y16 = Ay.*cos(2.*w1.*pi*t+m6);y17 = Ay.*cos(2.*w1.*pi*t+m7);y18 = Ay.*cos(2.*w1.*pi*t+m8);y21 = Ay.*cos(2.*w2.*pi*t+m1);y22 = Ay.*cos(2.*w2.*pi*t+m2);y23 = Ay.*cos(2.*w2.*pi*t+m3);y24 = Ay.*cos(2.*w2.*pi*t+m4);y25 = Ay.*cos(2.*w2.*pi*t+m5);y26 = Ay.*cos(2.*w2.*pi*t+m6);y27 = Ay.*cos(2.*w2.*pi*t+m7);y28 = Ay.*cos(2.*w2.*pi*t+m8);y31 = Ay.*cos(2.*w3.*pi*t+m1);y32 = Ay.*cos(2.*w3.*pi*t+m2);y33 = Ay.*cos(2.*w3.*pi*t+m3);y34 = Ay.*cos(2.*w3.*pi*t+m4);y35 = Ay.*cos(2.*w3.*pi*t+m5);y36 = Ay.*cos(2.*w3.*pi*t+m6);y37 = Ay.*cos(2.*w3.*pi*t+m7);y38 = Ay.*cos(2.*w3.*pi*t+m8);y41 = Ay.*cos(2.*w4.*pi*t+m1);y42 = Ay.*cos(2.*w4.*pi*t+m2);y43 = Ay.*cos(2.*w4.*pi*t+m3);y44 = Ay.*cos(2.*w4.*pi*t+m4);y45 = Ay.*cos(2.*w4.*pi*t+m5);y46 = Ay.*cos(2.*w4.*pi*t+m6);y47 = Ay.*cos(2.*w4.*pi*t+m7);y48 = Ay.*cos(2.*w4.*pi*t+m8);y51 = Ay.*cos(2.*w5.*pi*t+m1);y52 = Ay.*cos(2.*w5.*pi*t+m2);y53 = Ay.*cos(2.*w5.*pi*t+m3);y54 = Ay.*cos(2.*w5.*pi*t+m4);y55 = Ay.*cos(2.*w5.*pi*t+m5);y56 = Ay.*cos(2.*w5.*pi*t+m6);y57 = Ay.*cos(2.*w5.*pi*t+m7);y58 = Ay.*cos(2.*w5.*pi*t+m8);subplot(5,8,1);plot(x0,y11);Axis([-4 4 -4 4]);text(-16,0,'ω =1');text(-2,7,'0');text(-16,7,'相位差');subplot(5,8,2);plot(x0,y12);Axis([-4 4 -4 4]);text(-2,7,'π/4'); subplot(5,8,3);plot(x0,y13);Axis([-4 4 -4 4]);text(-2,7,'π/2'); subplot(5,8,4);plot(x0,y14);Axis([-4 4 -4 4]);text(-2,7,'3π/4'); subplot(5,8,5);plot(x0,y15);Axis([-4 4 -4 4]);text(-2,7,'π');subplot(5,8,6);plot(x0,y16);Axis([-4 4 -4 4]);text(-2,7,'5π/4'); subplot(5,8,7);plot(x0,y17);Axis([-4 4 -4 4]);text(-2,7,'3π/2'); subplot(5,8,8);plot(x0,y18);Axis([-4 4 -4 4]);text(-2,7,'7π/4'); subplot(5,8,9);plot(x0,y21);Axis([-4 4 -4 4]);text(-16,0,'ω = 1/2'); subplot(5,8,10);plot(x0,y22);Axis([-4 4 -4 4]);subplot(5,8,11);plot(x0,y23);Axis([-4 4 -4 4]);subplot(5,8,12);plot(x0,y24);Axis([-4 4 -4 4]);subplot(5,8,13);plot(x0,y25);Axis([-4 4 -4 4]);subplot(5,8,14);plot(x0,y26);Axis([-4 4 -4 4]);subplot(5,8,15);plot(x0,y27);Axis([-4 4 -4 4]);subplot(5,8,16);plot(x0,y28);Axis([-4 4 -4 4]);subplot(5,8,17);plot(x0,y31);Axis([-4 4 -4 4]);text(-16,0,'ω = 2/3'); subplot(5,8,18);plot(x0,y32);Axis([-4 4 -4 4]);subplot(5,8,19);plot(x0,y33);Axis([-4 4 -4 4]);subplot(5,8,20);plot(x0,y34);Axis([-4 4 -4 4]);subplot(5,8,21);plot(x0,y35);Axis([-4 4 -4 4]);subplot(5,8,22);plot(x0,y36);Axis([-4 4 -4 4]);subplot(5,8,23);plot(x0,y37);Axis([-4 4 -4 4]);subplot(5,8,24);plot(x0,y38);Axis([-4 4 -4 4]);subplot(5,8,25);plot(x0,y41);Axis([-4 4 -4 4]);text(-16,0,'ω = 3/4'); subplot(5,8,26);plot(x0,y42);Axis([-4 4 -4 4]);subplot(5,8,27);plot(x0,y43);Axis([-4 4 -4 4]);subplot(5,8,28);plot(x0,y44);Axis([-4 4 -4 4]);subplot(5,8,29);plot(x0,y45);Axis([-4 4 -4 4]);subplot(5,8,30);plot(x0,y46);Axis([-4 4 -4 4]);subplot(5,8,31);plot(x0,y47);Axis([-4 4 -4 4]);subplot(5,8,32);plot(x0,y48);Axis([-4 4 -4 4]);subplot(5,8,33);plot(x0,y51);Axis([-4 4 -4 4]);text(-16,0,'ω = 2/5'); subplot(5,8,34);plot(x0,y52);Axis([-4 4 -4 4]);subplot(5,8,35);plot(x0,y53);Axis([-4 4 -4 4]); subplot(5,8,36);plot(x0,y54);Axis([-4 4 -4 4]); subplot(5,8,37);plot(x0,y55);Axis([-4 4 -4 4]); subplot(5,8,38);plot(x0,y56);Axis([-4 4 -4 4]); subplot(5,8,39);plot(x0,y57);Axis([-4 4 -4 4]); subplot(5,8,40);plot(x0,y58);Axis([-4 4 -4 4]);。

相关文档
最新文档