Comment utiliser fsolve en MATLAB
Résolu
essa1
Messages postés
4
Date d'inscription
Statut
Membre
Dernière intervention
-
elhajri Messages postés 4 Date d'inscription Statut Membre Dernière intervention -
elhajri Messages postés 4 Date d'inscription Statut Membre Dernière intervention -
A voir également:
- Fsolve - matlab
- Gnu octave matlab - Télécharger - Édition & Programmation
- Matrice matlab ✓ - Forum Matlab
- Telecharger matlab ✓ - Forum Logiciels
- [MATLAB] transformer une matrice en vecteur - Forum Matlab
- Fonction matlab - Forum Matlab
6 réponses
bonjour ,
pour ceux qui n'ont pas pu utiliser la fonction fsolve, voilà COMMENT çA MARCHE :))
vous avez par exemple cette fonction non linéaire F(x)=x^2+1=0 la solution doit être = i
le problème avec "fsolve" c'est le point d'initialisation x0 de l'algotithme qui cherche la fontion:
donc si en prend x0=2 voilà l'instruction et le résultat:
x=fsolve(@(x) x^2+1,2)
Optimizer appears to be converging to a minimum that is not a root:
Sum of squares of the function values is > sqrt(options.TolFun).
Try again with a new starting point.
x =
0
donc il faut changer x0=3i+2 (choix arbitraire)
x=fsolve(@(x) x^2+1,3i+2)
Optimization terminated: first-order optimality is less than options.TolFun.
x =
0.0000 + 1.0000i
donc le problème est résolu.
pour ceux qui n'ont pas pu utiliser la fonction fsolve, voilà COMMENT çA MARCHE :))
vous avez par exemple cette fonction non linéaire F(x)=x^2+1=0 la solution doit être = i
le problème avec "fsolve" c'est le point d'initialisation x0 de l'algotithme qui cherche la fontion:
donc si en prend x0=2 voilà l'instruction et le résultat:
x=fsolve(@(x) x^2+1,2)
Optimizer appears to be converging to a minimum that is not a root:
Sum of squares of the function values is > sqrt(options.TolFun).
Try again with a new starting point.
x =
0
donc il faut changer x0=3i+2 (choix arbitraire)
x=fsolve(@(x) x^2+1,3i+2)
Optimization terminated: first-order optimality is less than options.TolFun.
x =
0.0000 + 1.0000i
donc le problème est résolu.