Question: Is this MATLAB code correct? I'm trying to run it, but it won't finish, and I'm getting no errors. I'm trying to solve this system
Is this MATLAB code correct?
I'm trying to run it, but it won't finish, and I'm getting no errors.
I'm trying to solve this system of 2 equations for the two unknowns, theta3 and theta4.
eq 1: R2*cos(theta2) + R3*cos(theta3) + R4*cos(theta4) - R1*cos(theta1) = 0
eq2 : R2*sin(theta2) + R3*sin(theta3) + R4*sin(theta4) + R1*sin(theta1); = 0
clear all clc
R1 = 2.4; R2 = 0.8; R3 = 1.23; R4 = 1.55;
theta2 = 49 * (pi/180); %(radians) theta1 = 0;
syms theta1 theta2 theta3 theta4 R1 R2 R3 R4 assume(0 <= theta3 | theta3 <= 2*pi | 0 <= theta4 | theta4 <= 2*pi) [theta3, theta4] = solve([0 == R2*cos(theta2) + R3*cos(theta3) + R4*cos(theta4) - R1*cos(theta1),... 0 == R2*sin(theta2) + R3*sin(theta3) + R4*sin(theta4) + R1*sin(theta1)], [theta3,theta4]); solutions = [theta3, theta4]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
