How to write objective function with one single vector variable?
显示 更早的评论
Hi.
I'm now working filter design. The objective function takes only one variable, which should be a vector (length around 15). Now I want to know how to write an objective function with only one single vector variable. Also I want to know which solver should I choose. I see that fmincon is a commonly used method but I don't know the format of the objective function for my case.
Here's my objective function:
all = norm((g_etau + g_dev_etau*x),inf);
first = all((g_sample_num*g_pass_area(1)):(g_sample_num*g_pass_area(2)),:);
second = g_lambada_p * (g_lr_pass + g_gradient_lr_pass * x);
third = g_lambada_s*(g_lr_stop + g_gradient_lr_stop*x);
output = norm(first,inf)+norm(second,inf)+norm(third,inf);
You can see that all the x inside are the variables and others are fixed value. How should I reformat this so I can use any solvers to solve this problem?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Choose a Solver 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!