Asked by Sakshi
on 13 Jun 2011

Hello, I am using ellipsoid function to represent an ellipsoid graphically. The input list requires me to enter the coordinates of the centre of ellipsoid and its semi-axes. There is no input for the orientation of the axis of the ellipsoid with respect to the coordinate system. Is there any way, this can be incorporated if my ellipsoids are at angle with respect to x, y and z axis.

Answer by Matt Fig
on 13 Jun 2011

Accepted answer

See the help for the ROTATE function.

For example:

[x, y, z] = ellipsoid(0,0,0,5.9,3.25,3.25,30); S = surfl(x, y, z); colormap copper axis equal xlabel('X') ylabel('Y') zlabel('Z') pause % Push return to see the rotation take place. rotate(S,[0 0 1],45)

Answer by Harsha Vardhan Rao Avunoori
on 13 Jun 2011

You can generate an ellipsoid with the ellipsoid function and while plotting you can use the rotate() suggest by Matt.It should help you.

Opportunities for recent engineering grads.

## 0 Comments