Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to make a program that gives me the correct values for Theta1 and Theta2 while switching my L1,L2, X and Y values, the

I need to make a program that gives me the correct values for Theta1 and Theta2 while switching my "L1,L2, X and Y values", the program shown below keeps giving me the same values for the Thetas even if I change the mention parameters (L1,L2,X and Y). Basically, I just need a program that gives me Theta1 and Theta2 based on (L1,L2, X and Y Parameters), Suppose these parameters are

L1=20, L2=25, X=10, Y=20

MATLAB CODE:

function myfunction(L1,L2,X,Y) THETA1=0; THETA2=0; for i=0:1800 for j=0:3600 XP=L2*cosd(THETA1+THETA2)+L1*cosd(THETA1); YP=L2*sind(THETA1+THETA2)+L1*sind(THETA1); if(X-XP)<0.01&&(Y-YP)<0.01; i=1801; j=3601; end THETA2=THETA2+0.1; end THETA1=THETA1+0.1; THETA2=0; end THETA1 THETA2 end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago