CODIGO MATLAB
% Declaraciones de Entrada
LongM=input('ingrese Longitud de Manivela:');
LongB=input('ingrese Longitud de la biela:');
n=0;
for TM=0:1:360 % Rango para Theta-Manivela
n=n+1;
% Desarrollo
Tm=TM*pi/180;
TB=asin(LongM*sin(Tm)/LongB);
Tb=TB*pi/180;
S=LongM*cos(Tm)+LongB*cos(Tb);
G(n,1)=Tm;
G(n,2)=Tb;
G(n,3)=S;
% Restricciones B-M
if LongB<LongM*sin(Tm)
break
end
end
disp(' Theta Manivela Theta Biela S');
G
% Graficas
figure(1)
plot(G(:,1),G(:,2),'b');
title('Om vs Ob')
xlabel('Om')
ylabel('Ob')
grid on
figure(2)
plot(G(:,1),G(:,3),'r');
title('Om vs S')
xlabel('Om')
ylabel('S')
grid on
PRIMER CASO: cuando LongM = 1 ; LongB = 5
SEGUNDO CASO: cuando LongM = 1 ; LongB = 1
TERCER CASO: cuando LongM = 1 ; LongB = 0.8