Create guess and Check loop in matlab
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Xerxes Achaemenid
le 5 Juin 2021
Commenté : Xerxes Achaemenid
le 5 Juin 2021
How can I create a guess and check loop for solve this equation: y=(2*x)-((2*x^2)*(1-exp(-1/x)))==0.211
Is there another way to solve this question?
0 commentaires
Réponse acceptée
Chunru
le 5 Juin 2021
y= @(x) (2*x)-((2*x.^2)*(1-exp(-1./x))) - 0.211; % define the function f(x)=0
x = fsolve(y, 0); % here x0 = 0;
help fsolve for more details.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!