![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1052775/image.png)
minimize linear objective function with quadratic constraint
2 次查看(过去 30 天)
显示 更早的评论
As stated in Koenker (2005) "Quantile Regression" page 10 equation (1.20). Quantile regression problem has the form
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1061550/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1061555/image.png)
where X now denotes the usual n × p matrix of regressors and y be the n × 1 vectors of outcomes and
is a n × 1 vector of ones
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1061560/image.png)
or it can be written as:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1061565/image.png)
In my case, I am trying to minimize the following quantile function
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1061685/image.png)
my objective function is linear with one quadratic constraint and the rest constraints are linears.
My quastion is how to solve my linear objective function subjecte to one quadratic constraint in matlab ?
Thanks in advance
0 个评论
回答(2 个)
Alan Weiss
2022-7-1
I'm not sure that I understand you correctly. If
is an array, then perhaps you are looking for
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1052775/image.png)
z = zeros(size(y - yhat));
m1 = max(z,y - yhat);
m2 = max(z,-(y - yhat));
Alan Weiss
MATLAB mathematical toolbox documentation
Alan Weiss
2022-7-11
Again, I am not sure that I understand you correctly. I do not know what your optimization variables are, and while you say that your constraints are linear and quadratic, the way you wrote the constraints makes them look more general. But if your
and
functions are linear in whatever your optimization variables are, then it is possible that the correct formulation of your problem would convert it to a coneprog form. See the coneprog reference page.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1061670/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1061675/image.png)
Alan Weiss
MATLAB mathematical toolbox documentation
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!