help pease, how to use syms? why this is not working?
1 次查看(过去 30 天)
显示 更早的评论
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)
0 个评论
采纳的回答
Star Strider
2021-1-9
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
.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!