Unable to find explicit solution
Show older comments
syms c l1 h1 d1 d2 d3 d4 l2 h2 k3 l3 h3 h4 k4 l4 B
q1=1/(d3^2)==((h3^2/d1^2*h1^2)+(k3^2)/(d2^2*l2^2)+l3^2/(c^2*sin(B)^2)-(2*h3*l3*cos(B))/(d1*h1*c*sin(B)));
q2=1/(d4^2)==((h4^2/d1^2*h1^2)+(k4^2)/(d2^2*l2^2)+l4^2/(c^2*sin(B)^2)-(2*h4*l4*cos(B))/(d1*h1*c*sin(B)));
sol=solve([q1, q2], [c, B]);
csol=sol.c
Bsol=sol.B
the Ans is 'Unable to find explicit solution'
but when I use value
the Ans can be found
h1=1; d3=10; d4=15; h3=2; h4=1; d1=24; k3=3; k4=2; d2=18; l2=2; l3=1; l4=3;
syms c B
q1=1/(d3^2)==((h3^2/d1^2*h1^2)+(k3^2)/(d2^2*l2^2)+l3^2/(c^2*sin(B)^2)-(2*h3*l3*cos(B))/(d1*h1*c*sin(B)));
q2=1/(d4^2)==((h4^2/d1^2*h1^2)+(k4^2)/(d2^2*l2^2)+l4^2/(c^2*sin(B)^2)-(2*h4*l4*cos(B))/(d1*h1*c*sin(B)));
sol=solve([q1, q2], [c, B]);
csol=sol.c
Bsol=sol.B
csol =
(919795581000*(- (38460*21210^(1/2))/149167 - 5603167/149167)^(1/2))/669312329 + (81000*(- (38460*21210^(1/2))/149167 - 5603167/149167)^(3/2))/4487
- (919795581000*(- (38460*21210^(1/2))/149167 - 5603167/149167)^(1/2))/669312329 - (81000*(- (38460*21210^(1/2))/149167 - 5603167/149167)^(3/2))/4487
(919795581000*((38460*21210^(1/2))/149167 - 5603167/149167)^(1/2))/669312329 + (81000*((38460*21210^(1/2))/149167 - 5603167/149167)^(3/2))/4487
- (919795581000*((38460*21210^(1/2))/149167 - 5603167/149167)^(1/2))/669312329 - (81000*((38460*21210^(1/2))/149167 - 5603167/149167)^(3/2))/4487
Bsol =
-2*atan((- (38460*21210^(1/2))/149167 - 5603167/149167)^(1/2))
2*atan((- (38460*21210^(1/2))/149167 - 5603167/149167)^(1/2))
-2*atan(((38460*21210^(1/2))/149167 - 5603167/149167)^(1/2))
2*atan(((38460*21210^(1/2))/149167 - 5603167/149167)^(1/2))
how can i show the Ans with symbol? thanks
Accepted Answer
More Answers (0)
Categories
Find more on Common Operations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!