0% found this document useful (0 votes)
42 views2 pages

All On On Equal: %% Defina El Valor de Las Dimensiones Del Mecanismo

This document defines the dimensions of a mechanism and uses those values in a for loop to calculate the x and y coordinates of points on the mechanism. It plots the mechanism over a range of theta2 values from 0 to 2pi in increments of 0.1 radians.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views2 pages

All On On Equal: %% Defina El Valor de Las Dimensiones Del Mecanismo

This document defines the dimensions of a mechanism and uses those values in a for loop to calculate the x and y coordinates of points on the mechanism. It plots the mechanism over a range of theta2 values from 0 to 2pi in increments of 0.1 radians.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

clc;

clear all;
hold on;
grid on;
axis equal;

%% Defina el valor de las dimensiones del mecanismo


R1= 2;
R2= 1.5;
R3= 2.5;
R4= 2.25;
R5= 5;
R6= 4;
R7= 4.5;
R8= 4;
R9= 2.5;

tol =0.01;
s = 0.0567;
theta1=0;
theta8=0;
x0= [0.261799, 1.423, 0.345, 0.7686];
for theta2 = 0:0.1:2*pi
cla
F =@fun1;
x0= [0.261799, 1.5708, 0.5657, 1.0472];
x = fsolve(F,x0);
d=theta2;

z = [0,R2*cos(d),R2*cos(d)+R3*cos(x(1)),R2*cos(d)+R3*cos(x(1))-
R4*cos(x(2)),R1*cos(theta1),R1*cos(theta1)+R8*cos(x(2)-
s),R1*cos(theta1)+R8*cos(x(2)-s)+R5*cos(x(3)),R1*cos(theta1)+R8*cos(x(2)-
s)+R5*cos(x(3))-R6*cos(x(4))]

y = [0,R2*sin(d),R2*sin(d)+R3*sin(x(1)),R2*sin(d)+R3*sin(x(1))-
R4*sin(x(2)),0,R1*sin(theta1)+R8*sin(x(2)-s),R1*sin(theta1)+R8*sin(x(2)-
s)+R5*sin(x(3)),R1*sin(theta1)+R8*sin(x(2)-s)+R5*sin(x(3))-R6*sin(x(4))];

plot(z,y);
pause (0.1);
axis([-10 10 -10 10]);

end

You might also like