find unknown in equation using solve
Mostrar comentarios más antiguos
I'm trying to find the value of Tb from the equation. but when i tried to run this code. I was not able to get the value
Bvals = [16.043;30.07;44.097;58.123;58.123;72.15;72.15;86.1754;100.2019;114.2285;128.2551;142.2817;156.3083;170.3348;184.3614;198.388;212.4146;226.4412;240.4677;254.4943;268.5209;612];
syms B Tb
sol = solve(B == (581.96*Tb^0.97476*(0.893^6.51274)*exp(((5.43076*10^-3)*Tb)-(9.53384*0.893)+((1.11056*10^-3)*Tb*0.893))),Tb);
vpa( subs(sol.', B, Bvals.') )
4 comentarios
Aditya Adhikary
el 28 de Mayo de 2018
When I run the following code,
syms B Tb
Bvals = [16.043;30.07;44.097;58.123;58.123;72.15;72.15;86.1754;100.2019;114.2285;128.2551;142.2817;156.3083;170.3348;184.3614;198.388;212.4146;226.4412;240.4677;254.4943;268.5209;612];
eqn1 = B == (581.96*Tb^0.97476*(0.893^6.51274)*exp(((5.43076*10^-3)*Tb)-(9.53384*0.893)+((1.11056*10^-3)*Tb*0.893)))
sol = solve(eqn1,Tb,'IgnoreAnalyticConstraints', true);
it gives me an output
eqn1 =
B == (62709197696165713583*Tb^(24369/25000)*exp((370231346317807487*Tb)/57646075230342348800 - 4792797782046133/562949953421312))/22
suggesting that this equation is incredibly hard to solve, or unsolvable. In fact, it does not run to completion. Please check if the equation you want to solve is indeed solvable or not.
Walter Roberson
el 28 de Mayo de 2018
Tb = 7023886036441063489536*LambertW(1156972957243148396875*225179981368524800^(631/24369)*62709197696165713583^(23738/24369)*B^(25000/24369)*exp(14977493068894165625/1714815926865494016)*(1/3066550881896166502584528862089179446939425312))*(1/46278918289725935875)
Eiko Raid
el 28 de Mayo de 2018
Walter Roberson
el 28 de Mayo de 2018
You are trying to find the general solution in terms of B when you do the solve() . That general solution (if it exists) would be of the general form Tb = f(B) for some function f() . That involves re-arranging the equation.
Unfortunately, MATLAB is weak on solving equations in terms of LambertW so it is not able to find the solution. I posted the solution extracted by a different software package.
You would not need to re-arrange the equation if you were to loop over the Bvals finding a numeric solution each time.
Respuestas (0)
Categorías
Más información sobre Conversion en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!