How to draw a second order cone relaxation using matlab?

3 次查看(过去 30 天)
Hello Dears
We know that X.Y=Z^2+Q^2 is a cone (lce cream cone or empty cone). I know how to draw this cone on Matlab. However, I don't know how to draw
X.Y>= Z^2+Q^2 (as we are fiiling the cone). Any help in doing that?
Regards
  2 个评论
Abdelrahman Aldik
Abdelrahman Aldik 2019-10-15
It's line having a cone with a closed lid instead of having a empty cone with an open lid. I'm not sure if I'm clear enough?
Regards

请先登录,再进行评论。

回答(1 个)

Abhisek Pradhan
Abhisek Pradhan 2019-10-17
patch() function can be used to create a polynomial fitting to the open end of the cone and putting it over it.
Following code shows simple way to generate a cone with closed lid.
N = 10;
r = linspace(1, 0, N);
[X,Y,Z] = cylinder(r, N);
figure(1)
surf(X,Y,Z);
patch(X,Y,Z);

类别

Help CenterFile Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by