How to optimize a parameter as well as independent variable

1 回表示 (過去 30 日間)
Xin CUI
Xin CUI 2016 年 5 月 4 日
回答済み: Alan Weiss 2016 年 5 月 4 日
I have a function to minimize. For example, f = a*x^2 + 2*x. Parameter a is also a function of x. For instance, a(x) = x-4. How to optimize x as well as parameter a?

回答 (1 件)

Alan Weiss
Alan Weiss 2016 年 5 月 4 日
I do not understand the problem. It seems to me that you can write your objective function as:
function f = ffun(x)
a = x-4;
f = a*x^2 + 2*x;
But I am sure that you already know this. So what is your real problem?
Alan Weiss
MATLAB mathematical toolbox documentation

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by