Getting "Error using horzcat." when trying to draw displacement graph for a Mechanism
First of, I am new to Matlab and sorry for my bad English. I'll try to explain clearly. I need to draw the displacement graph of a mechanism that has degrees of freedom = 1. That means every movement depends on the "theta21" angle. I tried to code that but I am having that error. What am i missing?
Mechanism;
My code;
A0A = 12.6; AB = 14; AD = 37.1;
EB = 45.5; BD =22.4; alfa = 39;
teta21 = linspace(128.57,488.57);
x1 = [1 -25.2*cosd(teta21-45) -1217.65];
y1 = roots(x1); A0D = y1(y1>=0);
teta31 = asind((A0D*sind(45)-A0A*sind(teta21))/AD);
epsilon = acosd((power(A0A,2)+power(AD,2)-power(A0D,2))/(2*A0A*AD));
A0B = sqrt((power(A0A,2)+power(AB,2))-(2*A0A*AB*cosd(epsilon)));
beta = acosd((A0D*cosd(45)-BD*cosd(teta31))./(A0B));
gamma = 180-(alfa+beta);
x2 = [1 (-2.*A0B.*cosd(gamma)) -1796.68];
y2 = roots(x2); A0E = y2(y2>=0);
A0Ex = A0E*cosd(alfa);
Error that i got;
7 个评论
回答(1 个)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!