How to optimize two variable simultaneously in a function?

5 ビュー (過去 30 日間)
NUPUR THAKUR
NUPUR THAKUR 2018 年 3 月 22 日
回答済み: Alan Weiss 2018 年 3 月 22 日
Following is the function that I want to optimize for two variable theta1_t and theta2_t. There are no constraints so I tried using the fminunc(), but it gives me an error. atk= exp(-theta2_t*k);
btk= (theta1_t/(theta1_t-theta2_t))*(exp(-theta2_t*k)- exp(-theta1_t*k));
func= (atk*y0)+(btk'*u)+gamma where gamma is known.
I have 165 values of theta1_t and theta2_t. I want to choose the optimum one of them. How can I do this? k ranges from 1 to 165.

採用された回答

Alan Weiss
Alan Weiss 2018 年 3 月 22 日
Are you doing curve fitting? I mean, you have a lot of data and you are trying to find the best parameters of an equation that fits the data? If so, see this example. If not, then I don't understand your question, so please explain a bit more, and maybe show some code or at least the complete MATLAB error message.
Alan Weiss
MATLAB mathematical toolbox documentation

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by