フィルターのクリア

Maximum X value for maximum calculation obsurd

1 回表示 (過去 30 日間)
Gavin Seddon
Gavin Seddon 2015 年 9 月 22 日
編集済み: Jan 2015 年 9 月 23 日
xHello using fminbnd to calculate a maximum, the resulting X value calculated is nought .9 whereas it should be about 3100. Can anyone suggest a reason for this? It appears that the curve in curve fitting tool is perfect however it doesn't appear to start at 0 where it should. Can anyone help please? Gavin.

採用された回答

Walter Roberson
Walter Roberson 2015 年 9 月 22 日
fminbnd is a local minimizer.
  2 件のコメント
John D'Errico
John D'Errico 2015 年 9 月 22 日
編集済み: John D'Errico 2015 年 9 月 22 日
PLEASE use comments instead of adding new answers for every comment. I have moved Gavin's comment into a comment from an answer by him:
Will you tell me a global minimiser along with its handler please?
It seems odd that the fminbnd command accepts limits yet minimises below them.
Gavin Seddon
Gavin Seddon 2015 年 9 月 23 日
編集済み: Jan 2015 年 9 月 23 日
Hello Walter, remember I am finding the maximum using -f. I fixed the problem using your comment. I redefined f as
f = @(x)-(p1.*x.^8+p2.*x.^7+p3.*x.^6+p4.*x.^5+p5.*x.^4+p6.*x.^3+p7.*x.^2+p8.*x+p9)
and then created the new handler, minusF = @(x) -f(x) and finally used
x = fminbnd(minusF,0, 3200)
this works but it gives
x = 3.2000e+03
Which is the maximum defined boundary. the curve appears to have a derivative of 0. Therein would you suggest defining this point to be at a position in which the Y variable varies less? Gavin.
[EDITED, Jan, Code formatted]

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by