symbolic equation Empty sym: 0-by-1

4 visualizaciones (últimos 30 días)
abdelrahmn ahmed
abdelrahmn ahmed el 17 de Sept. de 2019
Comentada: KALYAN ACHARJYA el 17 de Sept. de 2019
I'm newbie to matlab and when i tried to solve this equations it gives me an empty struct field
syms osx osy osz oex oey oez lf ls a k3 xe ye ze ya2 Rd Td ls
Td=[22;35;63];
lf=0.25;
Rd=[10 20 30 ;40 50 60 ;70 80 90];
ls=0.3
%%given rotation matrix and postion vector
os= Td-Rd*[0;0;1].*ls;
%%%%
a=atand(ye/ze);
k3=atand(xe/(cos(a)*ze-sin(a)*(ye-ya2)));
oez=os(3)-lf*(cos(a)*cos(k3));
oey=os(2)-lf*(-sin(a)*cos(k3));
oex=os(1)-lf*(sin(k3));
%%%
sol=solve([oex,oey,oez],[xe,ye,ze])
ny help appreciated..Thanks
  3 comentarios
John D'Errico
John D'Errico el 17 de Sept. de 2019
@Kalyan - you may have an older MATLAB release, that does not support atand operating on symbolic arguments.
My R2019a release has no such problem.
atand(xe)
ans =
(180*atan(xe))/pi
KALYAN ACHARJYA
KALYAN ACHARJYA el 17 de Sept. de 2019
Thanks @John for the useful information.

Iniciar sesión para comentar.

Respuesta aceptada

John D'Errico
John D'Errico el 17 de Sept. de 2019
When solve returns an empty result, that means it can find no analytical solution.
And since you have symbolic parameters in the equations, no numerical solution can exist. That is, at least ya2 has no value set, so it is a symbolic parameter. There might be others, but I did not look carefully for more than one parameter.
Sorry, but it is pretty easy to pose a problem for which no solution exsts. In fact, you just did it!
If you have a value for ya2 (and any other parameters in there that I missed) then you can use solve. The solution will probably not be unique then. And even then, it might only exist as a numerical solution.
Just because you want something to exist, does not make it so. Unless of course, your wand skills are pretty good. Mine simply are not sufficient.
  1 comentario
abdelrahmn ahmed
abdelrahmn ahmed el 17 de Sept. de 2019
I entered all values and one of the equation i want to solve is :
oex =
13 - sin((180*atan(xe/(ze*cos((180*atan(ye/ze))/pi) - sin((180*atan(ye/ze))/pi)*(ye - 1/2))))/pi)/4
I have three equations (oex,oey,oez)with three variables(xe,ye,ze).
why it won't be solved?

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by