绳拉线轴的运动

上传人:油条 文档编号:1577230 上传时间:2017-06-26 格式:PDF 页数:6 大小:142.96KB
返回 下载 相关 举报
绳拉线轴的运动_第1页
第1页 / 共6页
绳拉线轴的运动_第2页
第2页 / 共6页
绳拉线轴的运动_第3页
第3页 / 共6页
绳拉线轴的运动_第4页
第4页 / 共6页
绳拉线轴的运动_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《绳拉线轴的运动》由会员分享,可在线阅读,更多相关《绳拉线轴的运动(6页珍藏版)》请在金锄头文库上搜索。

1、 绳拉线轴的运动 物理系2001级 程鹏 学号01261094 如图所示,一绳拉动线轴在水平面 上做无滑滚动。线轴与地面的接触点 为瞬心。根据在惯性系中刚体对瞬心 的角动量定理得,当绳与地面的夹角 大于角A时,力F对瞬心的力矩使线 轴逆时针转动,反之当绳与地面的夹 角小于角A时,线轴顺时针转动。 源程序如下: %program gz.m f=1; R=5;r=2; m=10;l=8; theta=pi/6; t,u=ode45(gzfun,0:0.001:5,0,0,f,R,r,m,theta); x=R*u(:,1);y=R*ones(length(t),1); ll=l*ones(leng

2、th(t),1);rr=r*ones(length(t),1); xa=x+rr*sin(theta);ya=y-rr*cos(theta); xb=xa+(ll+r*u(:,1)*cos(theta); yb=ya+(ll+r*u(:,1)*sin(theta); xc=x-r*sin(u(:,1);yc=y-r*cos(u(:,1); xd=x-R*sin(u(:,1);yd=y-R*cos(u(:,1); figure axis(-20,20,-2,5); axis equal hold on a10=line(-20,20,0,0,color,k,linewidth,3.5); a20

3、=linspace(-20,20,80); for i=1:79 a30=(a20(i)+a20(i+1)/2; plot(a20(i),a30,0,0-0.5,color,b,. linestyle,-,linewidth,1); end fai=0:0.01:7;fai1=rot90(fai);yy=R*ones(length(fai),1); px=R*cos(fai1);py=yy+R*sin(fai1); qx=r*cos(fai1);qy=yy+r*sin(fai1); ball1=line(px,py,color,b,linewidth,2,erasemode,xor); bal

4、l2=line(qx,qy,color,b,linewidth,2,erasemode,xor); xian=line(xa(1),xb(1),ya(1),yb(1),color,k,. linewidth,2,erasemode,xor); gan=line(xc(1),xd(1),yc(1),yd(1),color,k,. linewidth,2,erasemode,xor); for i=1:length(t) xx=x(i)*ones(length(fai),1); pxx=xx+R*cos(fai1);pyy=yy+R*sin(fai1); qxx=xx+r*cos(fai1);qy

5、y=yy+r*sin(fai1); set(ball1,xdata,pxx,ydata,pyy); set(ball2,xdata,qxx,ydata,qyy); set(xian,xdata,xa(i),xb(i),ydata,. ya(i),yb(i); set(gan,xdata,xc(i),xd(i),ydata,. yc(i),yd(i); drawnow end function udot=gzfun(t,u,flag,f,R,r,m,theta) udot=u(2); 2*f*(R*cos(theta)-r)/3*m*(R2); function varargout = jiem

6、ian(varargin) % JIEMIAN Application M-file for jiemian.fig % FIG = JIEMIAN launch jiemian GUI. % JIEMIAN(callback_name, .) invoke the named callback. % Last Modified by GUIDE v2.0 24-Jun-2003 12:46:59 if nargin = 0 % LAUNCH GUI fig = openfig(mfilename,reuse); % Generate a structure of handles to pas

7、s to callbacks, and store it. Handles = guihandles(fig); guidata(fig, handles); if nargout 0 varargout1 = fig; end elseif ischar(varargin1) % INVOKE NAMED SUBFUNCTION OR CALLBACK try if (nargout) varargout1:nargout = feval(varargin:); % FEVAL switchyard else feval(varargin:); % FEVAL switchyard end

8、catch disp(lasterr); end end %| ABOUT CALLBACKS: %| GUIDE automatically appends subfunction prototypes to this file, and %| sets objects callback properties to call them through the FEVAL %| switchyard above. This comment describes that mechanism. %| %| Each callback subfunction declaration has the

9、following form: %| (H, EVENTDATA, HANDLES, VARARGIN) %| %| The subfunction name is composed using the objects Tag and the %| callback type separated by _, e.g. slider2_Callback, %| figure1_CloseRequestFcn, axis1_ButtondownFcn. %| %| H is the callback objects handle (obtained using GCBO). %| %| EVENT

10、DATA is empty, but reserved for future use. %| %| HANDLES is a structure containing handles of components in GUI using %| tags as fieldnames, e.g. handles.figure1, handles.slider2. This %| structure is created at GUI startup using GUIHANDLES and stored in %| the figures application data using GUIDAT

11、A. A copy of the structure %| is passed to each callback. You can store additional information in %| this structure at GUI startup, and you can change the structure %| during callbacks. Call guidata(h, handles) after changing your %| copy to replace the stored original so that subsequent callbacks s

12、ee %| the updates. Type “help guihandles” and “help guidata” for more %| information. %| %| VARARGIN contains any extra arguments you have passed to the %| callback. Specify the extra arguments by editing the callback %| property in the inspector. By default, GUIDE sets the property to: %| (, gcbo,

13、, guidata(gcbo) %| Add any extra arguments after the last argument, before the final %| closing parenthesis. % - function varargout = edit1_Callback(h, eventdata, handles, varargin) % - function varargout = pushbutton1_Callback(h, eventdata, handles, varargin) f=2; R=4;r=2; m=20;l=10; theta=pi/2*(ge

14、t(handles.slider1,value) %val1=str2double(get(handles.p-edit1,string) %set(handles,slider1,value,val1) t,u=ode45(gzfun,0:0.001:5,0,0,f,R,r,m,theta); x=R*u(:,1);y=R*ones(length(t),1); ll=l*ones(length(t),1);rr=r*ones(length(t),1); xa=x+rr*sin(theta);ya=y-rr*cos(theta); xb=xa+(ll+r*u(:,1)*cos(theta);

15、yb=ya+(ll+r*u(:,1)*sin(theta); xc=x-r*sin(u(:,1);yc=y-r*cos(u(:,1); xd=x-R*sin(u(:,1);yd=y-R*cos(u(:,1); axis(-15,15,-2,10); axis equal hold on a10=line(-15,15,0,0,color,k,linewidth,3.5); a20=linspace(-15,15,60); for i=1:59 a30=(a20(i)+a20(i+1)/2; plot(a20(i),a30,0,0-0.5,color,b,. linestyle,-,linewidth,1); end fai=0:0.01:7;fai1=rot90(fai);yy=R*ones(length(fai),1); px=R*cos(fai1);py=yy+R*sin(fai1); qx=r*

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 电子/通信 > 综合/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号