Change the output format

I using this equation to solve for H:
L = 20;
Y = 62.4;
Q = atan(80/L);
syms H
H = solve((4000*(L^2)) + ((500*Y)/(3*((sin(Q))^2))) - ((((H/6)*Y*(L^2))+((5/3)*Y*(L^2)))*((10+(2*H))/(10+H))) - ((Y*(H^3))/6) == 0)
When I solve for H, I get an answer in this format:
H =
((73008^(1/2)*417044942796875^(1/2))/73008 + 3923625/52)^(1/3) - 800/(3*((73008^(1/2)*417044942796875^(1/2))/73008 + 3923625/52)^(1/3))
400/(3*((73008^(1/2)*417044942796875^(1/2))/73008 + 3923625/52)^(1/3)) - ((73008^(1/2)*417044942796875^(1/2))/73008 + 3923625/52)^(1/3)/2 + (3^(1/2)*(800/(3*((73008^(1/2)*417044942796875^(1/2))/73008 + 3923625/52)^(1/3)) + ((73008^(1/2)*417044942796875^(1/2))/73008 + 3923625/52)^(1/3))*i)/2
400/(3*((73008^(1/2)*417044942796875^(1/2))/73008 + 3923625/52)^(1/3)) - ((73008^(1/2)*417044942796875^(1/2))/73008 + 3923625/52)^(1/3)/2 - (3^(1/2)*(800/(3*((73008^(1/2)*417044942796875^(1/2))/73008 + 3923625/52)^(1/3)) + ((73008^(1/2)*417044942796875^(1/2))/73008 + 3923625/52)^(1/3))*i)/2
Why can't I get this answer in a simple decimal format?

Antworten (1)

Walter Roberson
Walter Roberson am 5 Nov. 2013

0 Stimmen

The answer given to you is the exact answer. A decimal version would be an approximation. If you want to see the approximation,
double(H)

2 Kommentare

Leo
Leo am 5 Nov. 2013
Where can I write that in the script so I don't have to enter it in each time I get an answer in the command window?
ES
ES am 5 Nov. 2013
L = 20;
Y = 62.4;
Q = atan(80/L);
syms H
H = solve((4000*(L^2)) + ((500*Y)/(3*((sin(Q))^2))) - ((((H/6)*Y*(L^2))+((5/3)*Y*(L^2)))*((10+(2*H))/(10+H))) - ((Y*(H^3))/6) == 0);
H=double(H)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Gefragt:

Leo
am 5 Nov. 2013

Kommentiert:

ES
am 5 Nov. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by