finding minimum of a multivariable function in a specific domain
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Konstantinos Theodorakis
le 8 Juil 2017
Réponse apportée : John D'Errico
le 9 Juil 2017
I want to find the minimum of a multivariable function in a specific domain, which is a matrix. I have used fmincon, but it doesn't really help because the vector x of the minimum does not belong to the domain matrix i want it to. Having a specific domain is important for me because every variable of the function is connected with the others in a specific way; the variables are not independent. What do you suggest?
0 commentaires
Réponse acceptée
Walter Roberson
le 9 Juil 2017
Evaluate the function on every permitted combination of variables from the domain. Use min() to find the lowest of them.
... perhaps we do not understand what you mean by having a "specific domain which is a matrix" ?
0 commentaires
Plus de réponses (1)
John D'Errico
le 9 Juil 2017
What is wrong with the function min? You can use it to find the minimum value in the entire matrix, as well as where it came from.
A = rand(10,10,10);
[minA,minind] = min(A(:));
[minI,minJ,minK] = ind2sub(size(A),ind)
minI =
4
minJ =
8
minK =
10
If you really are asking to find a location that is intermediate to elements in the matrix, thus interpolation, then you need to use a tool for interpolation, one that is capable of a smoothly varying interpolation. Even then, there will potentially be multiple local solutions, and the result will only be as good as your method of interpolation.
0 commentaires
Voir également
Catégories
En savoir plus sur Interpolation dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!