Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

solving nonlinear equations using fzero..?

5 vues (au cours des 30 derniers jours)
JI Yong Song
JI Yong Song le 1 Juin 2018
Clôturé : JI Yong Song le 1 Juin 2018
I have to solve this equation (x-3)e^x+2=0 and i think i can do it with the fzero function. I looked up many examples but this type of equation can't be seen.. can anyone give me advice on how to solve this in MATLAB? Thanks

Réponse acceptée

Martynas Gabalis
Martynas Gabalis le 1 Juin 2018
my_function = @(x) (x - 3) * exp(x) + 2;
initial_guess = 3;
solution = fzero(my_function, initial_guess);

Plus de réponses (0)

Cette question est clôturée.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by