Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Warning: Explicit solution could not be found for a system of equations

Subject: Warning: Explicit solution could not be found for a system of equations

From: vros

Date: 13 May, 2013 15:16:18

Message: 1 of 2

hi, i just post here my script

syms theta1 theta2 theta3 theta5 theta6 r1 r2 r21 r3 r5 r6 r7 r4
[theta2,theta3,theta5,theta6] = solve('r1*cos(theta1)+r21*cos(theta2)+r5*cos(theta5)+r6*cos(theta6)-r4=0', 'r1*sin(theta1)+r21*sin(theta2)+r5*sin(theta5)+r6*sin(theta6)=0', 'r1*cos(theta1)+r2*cos(theta2)+r3*cos(theta3)-r7-r4 = 0','r1*sin(theta1)+r2*sin(theta2)+r3*sin(theta3)=0',theta2,theta3,theta5,theta6);

now i want to solve this system of trigonometric equations so that
theta2,theta3,theta5,theta6 are a function of theta1 !

but matlab give me the error "Warning: Explicit solution could not be found"
i think because i use syms ?!

who help me ??
Thank a lot !

Subject: Warning: Explicit solution could not be found for a system of equations

From: Steven_Lord

Date: 13 May, 2013 18:14:58

Message: 2 of 2



"vros " <valkren99@yahoo.it> wrote in message
news:kmr042$4k9$1@newscl01ah.mathworks.com...
> hi, i just post here my script
> syms theta1 theta2 theta3 theta5 theta6 r1 r2 r21 r3 r5 r6 r7 r4
> [theta2,theta3,theta5,theta6] =
> solve('r1*cos(theta1)+r21*cos(theta2)+r5*cos(theta5)+r6*cos(theta6)-r4=0',
> 'r1*sin(theta1)+r21*sin(theta2)+r5*sin(theta5)+r6*sin(theta6)=0',
> 'r1*cos(theta1)+r2*cos(theta2)+r3*cos(theta3)-r7-r4 =
> 0','r1*sin(theta1)+r2*sin(theta2)+r3*sin(theta3)=0',theta2,theta3,theta5,theta6);
>
> now i want to solve this system of trigonometric equations so that
> theta2,theta3,theta5,theta6 are a function of theta1 !
>
> but matlab give me the error "Warning: Explicit solution could not be
> found"
> i think because i use syms ?!

No, it's because the solutions will not just be a function of theta1 but
also of r1, r21, r5, r6, r4, etc. Specify values for those variables or at
the very least specify any assumptions that SOLVE can make about the
variables (positive, real, etc.) and SOLVE may be able to successfully
determine a solution,

Also, do NOT specify your equations to SOLVE as strings if you define values
for r1, r2, r21, etc. before your SOLVE call. Either use the == 0 syntax or
omit the = 0 part entirely.

http://www.mathworks.com/help/symbolic/solve-a-system-of-algebraic-equations.html

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us