Borrar filtros
Borrar filtros

Rearrange an equation to solve for a different variable

2 visualizaciones (últimos 30 días)
Brian Kirkland
Brian Kirkland el 13 de Abr. de 2022
Respondida: Sam Chak el 14 de Abr. de 2022
Hello,
I am trying to rearrange the equation "eqn" to solve for (isolate the variable) "t" but my current code will not produce an answer.
Is there a different function/ solver I should use instead?
Thank you.

Respuestas (1)

Sam Chak
Sam Chak el 14 de Abr. de 2022
If the explicit solution cannot be found, then it is probably a transcendental equation, just like this one:
.
So, you need to employ the numerical approach:
fun = @(x) x + sin(x) - 2; % nonlinear function
x_guess = 1; % initial guess
sol = fzero(fun, x_guess) % solution
sol = 1.1061

Categorías

Más información sobre Programming en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by