how can I write Matlab codes for a nonlinear simultaneous equation for a loop function

I am doing a simulation on a four bar linkage mechanism where theta2 is the drive link and I'm to determine theta3 and theta4 from my analysis. I am interested in a 'FOR-LOOP' situation whereby theta2 makes a complete cycle.
clc;
clear all;
syms theta3
syms theta4;
theta2 = 0:pi/18:2*pi;
fgh=solve(2*cos(theta2) + 6 * cos(theta3) - 4 * cos(theta4) -5 == 0,2*sin(theta2) + 6 * sin(theta3) - 4 * sin(theta4) == 0);
fgh.theta3;
fgh.theta4;
k = vpa(fgh.theta3)
j = vpa(fgh.theta4)

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

No tags entered yet.

Asked:

on 3 Feb 2017

Edited:

on 4 Feb 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!