MATLAB: Help pease, how to use syms? why this is not working

how to use syms?

why this is not working?
————————————–
syms h
Q = 10;
k = 50;
A = 4*h;
R = (4*h/(4+2*h))^(2/3);
I = sqrt(0.0016);
eqn = Q == k*A*R*I;
solve(eqn)

Best Answer

It is working.
Ths eolution is simply not as straightforward as it might first appear.
Consider:
syms h
Q = 10;
k = 50;
A = 4*h;
R = (4*h/(4+2*h))^(2/3);
I = sqrt(0.0016);
eqn = Q == k*A*R*I;
h_sol1 = solve(eqn, 'ReturnConditions',1);
h = h_sol1.h
parms = h_sol1.parameters
cndx = h_sol1.conditions
producing:
h =
z1
parms =
z1
cndx =
((64*z1^3)/(2*z1 + 4)^3 == 0 | signIm((z1^3*1i)/(2*z1 + 4)^3) == 1) & z1^5 - (125*z1^2)/256 - (125*z1)/64 - 125/64 == 0
However if you only want a numerical solution:
h_num = vpasolve(eqn)
produces:
h_num =
1.4163045145295919139517656951779
.