How to optimize two variable simultaneously in a function?
5 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!