function [d,theta3]=slider_solve(theta2,R,L,e,mode)
其參數之定義詳如程式內容。
程式4.8
function [d,theta3]=slider_solve(theta2,R,L,e,mode)
% P4.8 [d,theta3]=slider_solve(theta2,R,L,e)
%
% Find the block coordinate and angle of connecting rod in a slider-crank system
% Input:R,L lengths of crank & connecting rod; e the offset of block
% theta2: angles of crank, cane be a matrix
% Output: d:distance of the block from the origin.
% theta3:angle of the connecting rod,
% Examples:
% [d,theta3]=slider_solve(45,5,10,3)
%
% Designed by D.S. Fon, BIME, NTU, Date:Fegruary 9,2003.
if nargin<5, mode=0;end
d2g=pi/180;
theta=theta2*d2g;
cc=(e-R.*sin(theta))./L;
if mode>=0,
theta3=asin(cc);
else
theta3=asin(-cc)+pi;
end
d=L.*cos(theta3)+R.*cos(theta);
theta3=theta3/d2g;
範例4.9
試比較一組曲桿滑塊機構R=5cm,L=10cm,e=6 cm,試求曲柄角度為30、45、60、90度時之連結桿角及滑塊之水平距離。
[解]:
>> [d,theta3]=slider_solve([30 45 60 90],5,10,6,1)
d = 13.6976 13.2271 12.3596 9.9499
theta3 = 20.4873 14.2673 9.6127 5.7392
No comments:
Post a Comment