how to find argmin to this vector
96 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Murali Krishna AG
am 24 Nov. 2020
Kommentiert: Murali Krishna AG
am 24 Nov. 2020
c=argmin f(a,b).where both a,b are M*1 and N*1 column matrices respectively.
How to get a,b for minimum value of f(a,b) from matlab
2 Kommentare
James Tursa
am 24 Nov. 2020
What does it mean to find the minimum value or index of two vectors with different lengths? Can you provide a short example of inputs and desired output?
Akzeptierte Antwort
KSSV
am 24 Nov. 2020
Are you looking for something like this?
Let a,b be your column matrices.
[a,b] = meshgrid(a,b) ; % make them a matrix
F = f(a,b) ; % evaluate your function, use element by element operations in f
[val,idx] = min(F(:)) ;
amin = a(idx) ;
bmin = b(idx) ;
Have a look on fmincon.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Performance and Memory finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!