Trouble Coding Kinematics Problem
2 ビュー (過去 30 日間)
I am trying to code this problem into MATLAB. I want to solve for theta3, theta4, w3, and w4 (w being omega). I am having some trouble getting my thetas to work. When I try to solve, say, for theta2=95 degrees, I keep getting 0 and 1 degree, respectively. Is my problem just setting up the code incorrectly, or is it something else?
Thank you in advance!
theta2=input('Enter a Value For Theta 2 in Degrees: ');
w1=0; %ground; can't move
theta1=0; %ground; no angle
syms theta3 theta4
%R2+R3=R1+R4 -> OA+AB=OC+BC -> OA+AB-OC-BC=0
sol1=solve([eq1,eq2], [theta3 theta4]);
% syms w3 w4
% %time derivative equations = velocity equations
fprintf('Theta 3 is %.f degrees\n',theta3_(1))
fprintf('Theta 4 is %.f degrees\n',theta4_(1))
% fprintf('The angular velocity of omega 3 is %.f rad/s\n',w3)
% fprintf('The angular velocity of omega 4 is %.f rad/s\n',w4)