文件名称:四杆机构matlab仿真
文件大小:2KB
文件格式:NONE
更新时间:2013-08-11 05:12:01
四杆机构
function four_bar global L0 L1 L2 L3 th1; %str=inputdlg({'please input rack_length L0:','please input crank_length L1:', % 'please input linkage_length L2:','please input rock_length L3:', % 'please input w1(rad/sec):','please input repeat times m:', %'please input initial theta3:'},'please input!',1,{'20','8','25','20','100','10','1'}); %clc; L0=20; L1=8; L2=25; L3=20; w1=100; m=10; theta3=1; t=linspace(0,2*pi/w1,181); c = [t(:,1:1-1) t(:,1+1:end)]; b = [c(:,1:1-1) c(:,1+1:end)]; dt=2*pi/w1/180; theta1=w1*t; th1=theta1(1); %y=four_bar_equation(x); theta3(1)=fzero(@four_bar_equation,theta3); x_a=0;y_a=0; x_b=x_a+L1*cos(theta1(1));y_b=y_a+L1*sin(theta1(1)); x_d=x_a+L0;y_d=y_a; x_c=x_d+L3*cos(theta3(1));y_c=y_d+L3*sin(theta3(1));