minimum of the matrix

3 ビュー (過去 30 日間)
Mohamed Aburakhis
Mohamed Aburakhis 2016 年 4 月 21 日
編集済み: dpb 2016 年 4 月 21 日
How to get the number of the minimum element in matrix for example
for i=0:10
f(i)=i^2-10*i+2
argument to find i that minimize the function
end

採用された回答

dpb
dpb 2016 年 4 月 21 日
i=0:10;
f=i.^2-10.*i+2;
[fmin,imin]=min(f); % minimum to nearest integer value
To solve for the minimum, couple of ways. Using numerical w/o the symbolic toolbox one is
fsolve(@(x) polyval(polyder([1 -10 2]),x),1)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by