MATLAB Answers

How to draw a second order cone relaxation using matlab?

6 views (last 30 days)
Abdelrahman Aldik
Abdelrahman Aldik on 14 Oct 2019
Answered: Abhisek Pradhan on 17 Oct 2019
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 Comments

Abdelrahman Aldik
Abdelrahman Aldik on 15 Oct 2019
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

Sign in to comment.

Answers (1)

Abhisek Pradhan
Abhisek Pradhan on 17 Oct 2019
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);

  0 Comments

Sign in to comment.


Translated by