matlab實(shí)現(xiàn)簡(jiǎn)單物理實(shí)驗(yàn)?zāi)M.doc_第1頁(yè)
matlab實(shí)現(xiàn)簡(jiǎn)單物理實(shí)驗(yàn)?zāi)M.doc_第2頁(yè)
matlab實(shí)現(xiàn)簡(jiǎn)單物理實(shí)驗(yàn)?zāi)M.doc_第3頁(yè)
matlab實(shí)現(xiàn)簡(jiǎn)單物理實(shí)驗(yàn)?zāi)M.doc_第4頁(yè)
免費(fèi)預(yù)覽已結(jié)束,剩余1頁(yè)可下載查看

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

一. ball.mclear vx=input(please input the speed ration of Vx and Vi:);k=input(coefficient of rebound(=1 return,end tm=(1+k)/(1-k); xm=vx*tm; figure plot(0,xm,0,0,LineWidth,3) grid on axis equal axis(0,xm,0,1) title(Trajectoey of ball,FontSize,16)xlabel(horizontal distance(m),FontSize,16) ylabel(Vertical height(m),FontSize,16) dt=0.001; tm=1; t=0:dt:tm; x=2*vx*t; y=1-t.2; i=0; hold on while tm0.01 comet(x,y) plot(x,y,LineWidth,2) i=i+1; tm=2*k.i; t=0:0.001:tm; x=x(end)+2*vx*t; y=2*ki*t-t.2; end 二. collision.m clear m=0:0.5:2; n=length(m); theta=0:5:90; th=theta*pi/180; M,TH=meshgrid(m,th); PHI=2*asin(sin(TH/2)./(1+M)*180/pi; figure(1) plot(theta,PHI(:,1),o-,theta,PHI(:,2),s-,theta,PHI(:,3),d-,. theta,PHI(:,4),p-,theta,PHI(:,5),h-)xlabel(itthetarm/circ,FontSize,16)ylabel(itphirm/circ,FontSize,16)title(Angle of ball and object,FontSize,16)grid on legend(repmat(Ratio of massitM/mrm=,n,1),num2str(m),2)DE=M./(1+M).*(1-cos(TH); figure(2) plot(theta,DE(:,1),o-,theta,DE(:,2),d-,theta,DE(:,3),s-,. theta,DE(:,4),p-,theta,DE(:,5),h-)xlabel(itthetarm/circ,FontSize,16)ylabel(DeltaitE/mgl,FontSize,16) title(Mechanical Energy,FontSize,16)grid on legend(repmat(Ration of massitM/mrm=,n,1),num2str(m),2)三. niudunhuan.m clear rm=5; r=-rm:0.01:rm; X,Y=meshgrid(r); R=sqrt(X.2+Y.2); I=cos(pi*(R.2+1/2).2; I(Rrm)=0; c=linspace(0,1,64); figure d=image(I*64); %ColorMap(c,c*0,c*0) %ColorMap(c,c,c*0) ColorMap(c,c,c) axis off equal title(Newton ring,FontSize,16) pause h=0; while 1 h=h+0.02; I=cos(pi*(R.2+1/2+2*h).2; I(Rrm)=0; set(d,CData,64*I) drawnow if get(gcf,CurrentCharacter)=char(27) break,endend 四. stick.mclear g=10; v0=12; theta=input(angle of incidence:); th=theta*pi/180; w=10*pi; l=1; m1=0.2; m2=0.3; r1=l*m2/(m1+m2); r2=l*m1/(m1+m2); t0=2*v0*sin(th)/g; n=200; t=linspace(0,t0,n); xc=v0*cos(th)*t; yc=v0*sin(th)*t-g*t.*t/2; x1=xc+r1*cos(w*t); y1=yc+r1*sin(w*t); x2=xc-r2*cos(w*t); y2=yc-r2*sin(w*t); figure h12=plot(x1(1);x2(1),y1(1);y2(1),-o,LineWidth,6);grid on axis(-0.5,xc(end)+1,-1.5,max(yc)+1) axis equal title(Motion of lifgt stick,FontSize,16)xlabel(x(m),FontSize,16) ylabel(y(m),FontSize,16) hold on pause for i=1:n-1 set(h12,XData,x1(i);x2(i),YData,y1(i);y2(i); plot(xc(i);xc(i+1),yc(i);yc(i+1),LineWidth,2) plot(x1(i);x1(i+1),y1(i);y1(i+1),k) plot(x2(i);x2(i+1),y2(i);y2(i+1),r) if floor(i-1)/20)=(i-1)/20 plot(x1(i);x2(i),y1(i);y2(i),LineWidth,2) plot(x1(i),y1(i),ko) plot(x2(i),y2(i),ro) end drawnow end 五. tanhuang.mclear a=0.2; xm=1+2*a; xx=linspace(0,1+a,1000); n=20; s0=0.02; yy=s0*sin(xx/(1+a)*n*2*pi); figure subplot(2,1,1) plot(1;1,-2;-4*s0) grid on axis equal off title(motion of spring oscillator,FontSize,16) hold on plot(0;0;xm,1;-1;-1*2*s0,LineWidth,3)ball=plot(1+a,yy(end),g.,MarkerSize,50);spring=plot(xx,yy,r,LineWidth,2); pause t=0; dt=0.005; while 1 if get(gcf,CurrentCharacter)=char(27) break;end x=a*cos(2*pi*t); set(ball,XData,1+x) xx=linspace(0,1+x,1000); yy=s0*sin(xx./(1+x)*n*2*pi); set(spring,XData,xx,YData,yy) drawnow t=t+dt; end t=0:dt:t; x=a*cos(2*pi*t); subplot(2,1,2) plot(t,x,LineWidth,2) grid on title(Displacement of spring oscillator,FontSize,16) xlabel(Time(S),FontSize,16) ylabel(Amplitude(m),FontSize,16) 六. zhuangdongguan.mclear d=0:0.01:1; j=1/12+d.2; figure plot(d,j,LineWidth,2) grid on title(Moment of inertia for stick,FontSize,16)xlabel(Distanc(m),FontSize,16) ylabel(Moment of inertia(Kgm2),FontSize,16)hold on stem(0,0.5,1/12,1/3,-) text(0,1/12,J_C=ML2/12,FontSize,16)text(0.5,1/3,J_L=ML2/3,FontSize,16)七. 波的疊加x=-10:0.01:10;t=0:0.04:18;X,T=meshgrid(x+7,t);FX,T=meshgrid(-x+7,t);u=10*exp(-(X-T).2);v=5*exp(-(FX-T).2/4);y=u+v;M=moviein(length(t);for j=1:length(t) plot(x,y(j,:); grid on; title(Movie); axis(-10 10 0 15); M(:,j)=getframe;end;movie(M,2)八. 雙縫干涉clear allym=1.25;y=linspace(-ym,ym,101);d=2;z=1000;lambda=5e-4;L1=sqrt(y-1).2+z2);L2=sqrt(y+1).2+z2);phi=2*pi*(L2-L1)/lambda;I=4*(cos(phi/2).2;subplot(2,1,1)plot(y,I)axis(-1.25 1.25 0 4)subplot(2,1,2)B=I*255/5;image(B);colormap(gray(225);九. 阻尼衰減function zuni(deta,a)t=0:0.01*pi:4*pi;A=2;x=A*exp(-deta*t).*cos(2*pi*t+a);plot(t,x)title(Damped vibration)xlabel(Time (s)ylabel(Amplitude (m)grid onSo you BseekApClDwBfAuBsAbCiAcDcCdissDexplAlongCcDpBcCdiscouragedAwhereDa It is CtBfCshowing upBaAsCcDdefendAserD

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論