What am I doing wrong on this problem?
이전 댓글 표시
Question:
For the walking beam mechanism in the figure below, calculate and plot the x and y components of the position of the coupler point P for one complete revolution of the crank O2A. Hint: Calculate them first with respect to the ground link O204 and then transform them into the global XY coordinate system (i.e., horizontal and vertical in the figure). Scale the figure for any additional information needed.
%%Walking Beam Problem
clear all; close all; clc;
%%Variables
a=1;
b=2.06;
c=2.33;
d=2.22;
p=3.06;
gamma=31*pi/180;
theta2= zeros (360,1)
%%Main Program
for i=1:361;
theta2(i)=(i-1)*(pi/180);
r=d-a*cos(theta2(i));
s=a*sin(theta2(i));
f2=r^2+s^2;
delta=acos((b^2+c^2-f2)/(2*b*c));
g=b-c*cos(delta);
h=c*sin(delta);
theta3(i)=atan2(h*r-g*s,g*r+h*s);
xp(i)=a*cos(theta2(i)+p*cos(theta3(i)+gamma));
yp(i)=a*sin(theta2(i)+p*sin(theta3(i)+gamma));
end
plot(xp,yp,'color','r')
grid on
title ('title')
xlabel('title')
ylabel('title')
댓글 수: 4
Walter Roberson
2015년 9월 17일
no figure was included
Image Analyst
2015년 9월 18일
편집: Image Analyst
2015년 9월 18일
The PNG image you attached just shows gibberish. Try it and see. And why do you think something is wrong? What indicates that to you?
Walter Roberson
2015년 9월 18일
Lately, my browser has tried to render most images as if they were text, including this one. If I download the image and use a viewer then it shows up fine.
George Lentini
2015년 9월 20일
편집: George Lentini
2015년 9월 20일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!