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!