Trouble solving equation fsolve
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi everybody,
I got some trouble solving this equation.The solution of the following equation is correct but i would like to solve the equation semplifying it, i.e. replacing my coefficients with letters. Othervise replacing my coefficients with vectors.
Ex. a=1.66 b=0.000127 c=2.5 d=0.000423
syms x
solve ('1.66/((9.81*x*0.000127)^(0.5))=6+2.5*log(x/(2.5*0.000423))',x)
ans =
3.2523216595041554101826783891542
Can anybody hel me?
I'm a beginner.
0 commentaires
Réponses (1)
John D'Errico
le 24 Jan 2019
Modifié(e) : John D'Errico
le 24 Jan 2019
Not sure what the problem is. And why are you asking about fsolve?
a = 1.66;
b = 0.000127;
c = 2.5;
d = 0.000423;
g = 9.81;
syms x
solve (a/sqrt(g*x*b) == 6 + c*log(x/(c*d)),x)
Warning: Unable to solve symbolically. Returning a numeric solution using vpasolve.
> In solve (line 304)
ans =
3.2523216595041553985081838768663
No symbolic solution was found, so it used vpasolve to find a numerical solution. wtp?
If you wanted a fully general analytical solution, tough luck. It is terribly easy to write an equation that has no analytcal solution. In fact, it seems you just did it.
Note my use of sqrt, insead of raising to a fractional power. Far easier to read.
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!