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!
clear; clc;
theta2=input('Enter a Value For Theta 2 in Degrees: ');
w2=10;
OC=10;
OA=4;
AB=12;
BC=7;
w1=0;
theta1=0;
syms theta3 theta4
eq1=OA*cos(theta2)+AB*cos(theta3)-BC*cos(theta4)-OC*cos(theta1)==0;
eq2=OA*sin(theta2)+AB*sin(theta3)-BC*sin(theta4)-OC*sin(theta1)==0;
sol1=solve([eq1,eq2], [theta3 theta4]);
theta3_=sol1.theta3;
theta4_=sol1.theta4;
fprintf('Theta 3 is %.f degrees\n',theta3_(1))
fprintf('Theta 4 is %.f degrees\n',theta4_(1))