Résoudre Equation second degré

Fermé
Max_4137 Messages postés 1 Date d'inscription lundi 19 septembre 2016 Statut Membre Dernière intervention 19 septembre 2016 - 19 sept. 2016 à 09:25
Bonjour,
J'ai un système d'équation que je souhaiterais résoudre mais malhereureusement je n'y arrive pas. Il s'agit d'un système d'équations du second degré (17 équations, 17 inconnues), mais quand j'utilise la fonction "solve", Matlab semble tourner dans le vide indéfiniment. Une petite aide serait la bienvenue!

Voici un extrait de mon code:


a = [2.38705 ; 0.55879 ; 0.07082];
b = [2.58905 ; 0.40879 ; 0.09282];
c = [2.58330 ; 0.70922 ; 0.11628];
d = [2.32884 ; 0.55409 ; -0.06968];
e = [2.59084 ; 0.34109 ; -0.13218];
f = [2.59807 ; 0.74465 ; -0.15085];
g = [2.74650 ; 0.26511 ; -0.03613];
h = [2.75163 ; 0.75019 ; -0.03188];

TCP = [2.59000 ; 0.78644 ; -0.35000];
SP = [2.59000 ; 0.88644 ; -0.01211];
WC = [2.59000 ; 0.78644 ; -0.01342];

% point c
ch = h - c;
cf = f - c;
ca = a - c;
cb = b - c;

% point f
fh = h - f;
fd = d - f;
fe = e - f;
fWC = WC - f;

% point h
hg = g - h;
hWC = WC - h;
hSP = SP - h;
hTCP = TCP - h;

% axis
WCSP = SP - WC;
WCTCP = TCP - WC;
TCPSP = SP - TCP;

cWC = WC - c;
fSP = SP - f;

TCPz(1) = -0.45;

syms cx cy cz fx fy fz hx hy hz WCx WCy WCz SPx SPy SPz TCPx TCPy

eqn1 = ((cx - hx)^2 + (cy - hy)^2 + (cz - hz)^2 ) == (norm(ch)^2);
eqn2 = ((cx - fx)^2 + (cy - fy)^2 + (cz - fz)^2 ) == (norm(cf)^2);
eqn3 = ((cx - a(1))^2 + (cy - a(2))^2 + (cz - a(3))^2) == (norm(ca)^2);
eqn4 = ((cx - b(1))^2 + (cy - b(2))^2 + (cz - b(3))^2 )== (norm(cb)^2);
eqn5 = ((cx - WCx)^2 + (cy - WCy)^2 + (cz - WCz)^2) == (norm(cWC)^2);

eqn6 = ((fx - hx)^2 + (fy - hy)^2 + (fz - hz)^2 ) == (norm(fh)^2);
eqn7 = ((fx - d(1))^2 + (fy - d(2))^2 + (fz - d(3))^2 ) == (norm(fd)^2);
eqn8 = ((fx - e(1))^2 + (fy - e(2))^2 + (fz - e(3))^2 ) == (norm(fe)^2);
eqn9 = ((fx - WCx)^2 + (fy - WCy)^2 + (fz - WCz)^2 ) == (norm(fWC)^2);
eqn10 = ((fx - SPx)^2 + (fy - SPy)^2 + (fz - SPz)^2 ) == (norm(fSP)^2);

eqn11 = ((hx - g(1))^2 + (hy - g(2))^2 + (hz - g(3))^2 ) == (norm(hg)^2);
eqn12 = ((hx - WCx)^2 + (hy - WCy)^2 + (hz - WCz)^2 ) == (norm(hWC)^2);
eqn13 = ((hx - SPx)^2 + (hy - SPy)^2 + (hz - SPz)^2 ) == (norm(hSP)^2);
eqn14 = ((hx - TCPx)^2 + (hy - TCPy)^2 + (hz - TCPz(1))^2 ) == (norm(hTCP)^2);

eqn15 = ((WCx - SPx)^2 + (WCy - SPy)^2 + (WCz - SPz)^2 ) == (norm(WCSP)^2);
eqn16 = ((WCx - TCPx)^2 + (WCy - TCPy)^2 + (WCz - TCPz(1))^2 ) == (norm(WCTCP)^2);
eqn17 = ((TCPx - SPx)^2 + (TCPy - SPy)^2 + (TCPz(1) - SPz)^2 ) == (norm(TCPSP)^2);


A = solve([eqn1,eqn2,eqn3,eqn4,eqn5,eqn6,eqn7,eqn8,eqn9,eqn10,eqn11,eqn12,eqn13,eqn14,eqn15,eqn16,eqn17]);