how to find argmin to this vector
96 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
James Tursa
2020 年 11 月 24 日
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?
採用された回答
KSSV
2020 年 11 月 24 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Performance and Memory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!