フィルターのクリア

How can I find the changing maximum of a function as another parameter changes

4 ビュー (過去 30 日間)
Valeria Garcia
Valeria Garcia 2015 年 6 月 23 日
回答済み: Udit Gupta 2015 年 6 月 23 日
For example if I have a function:
y=-Ax^2+Bx+C-Dcos(Ax)
where A B C and D are constants and x is the independent variable
I would like to find the maximum of the function at different values of A

採用された回答

Udit Gupta
Udit Gupta 2015 年 6 月 23 日
The fact that you require to find something with different values of A implies that A can no longer be treated as a constant. So in effect this is a two dimensional function
y(A,x) =-Ax^2+Bx+C-Dcos(Ax)
To find the maximum you can use various methods -
1.you can wither use multi-dimensional derivatives to find maxima, minima and saddle points (see a calculus textbook)
2. In matlab use meshgrid to continuously vary A and x and plot a surface plot to find the maximum.
3. Realize that y is a sum of a quadratic function and a periodic cosine. The extrima of a quadratic function is the vertex (can be either maxima or minima depending on sign of A) and that the periodic function varies between +/-D. So analyzing it becomes not too difficult.

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by