finding minimum of a multivariable function in a specific domain

2 vues (au cours des 30 derniers jours)
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?

Réponse acceptée

Walter Roberson
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" ?

Plus de réponses (1)

John D'Errico
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.

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!

Translated by