lokale Extrema in 4D über sweep finden

5 views (last 30 days)
Marc Laub
Marc Laub on 27 Nov 2023
Commented: R on 2 Jan 2024
Hallo,
ich habe folgendes Problem:
Gegeben sei eine Function f(a,b,c). Diese Funktion hat 2 Extrema, die ich gerne wissen möchte. Ich will Sie nicht exakt wissen, benötige also keinen Fit. Sondern mir reicht die ungefähre Position.
Bisher sweepe ich für a,b und c einfach über den Parameterraum und nehme dann a,b,c von max(f(a,b,c)). Dieses Vorgehen bringt aber nichts bzgl. des 2. möglichen Extremums, und maxk(f) ist ja auch keine Möglichkeit, da ich nicht weiß welches k, das zweite Maximum wäre, falls es überhaupt existiert.
Als Beispiel mal die function f dargestellt mit einem sweep über a auf der x-Achse, die verschiedenen Werte von ffür ein a entsprechen dann den Werten für f(a) mit verschiedenen Werten für b und c. Zweites Bild ist ein vergrößerter Ausschnitt. Die Werte für f für die sweeps über b und c sehen ähnlich aus.
Wie würde ich jetzt and die Werte a,b und c für das linke Maximum kommen?
Vielen Dank bereits im Vorraus
  2 Comments
Dyuman Joshi
Dyuman Joshi on 27 Nov 2023
"und maxk(f) ist ja auch keine Möglichkeit, da ich nicht weiß welches k, das zweite Maximum wäre, falls es überhaupt existiert."
Could you elaborate on this?
Also, Can you share the data you are working with? Use the paperclip button to attach.
R
R on 2 Jan 2024
There are multiple functions in MATLAB library that can help you achieve this depending upon your use case. The function you use will rely heavily on the code, function as well as your exact use case. Try exploring findpeaks, fmincon or other minimizers that will help you find the local minima depending on your use case. You can negate the equation you are using and find the minima instead using the functions in MATLAB's Optimization Toolbox.
If none of these suit your workflow, consider adding the data and code you are working with so that contributors can investigate the issue in detail.

Sign in to comment.

Answers (0)

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!