Point Englobed In A Cube

Hi,
sorry for my bad English.
I've some random points in 3D space:
A=[21 55 55; 53 65 55; 61 51 11; 14 50 21; 58 49 22; 25 22 32; 10 0.2 21; 21 0.5 25; 55 88 90; 2.2 2 21; 4 7 11; 6 99 10; 7 8 9; 8 10 8; 1 57 15; 8 12 48; 1 27 98];
I've calculated the centroid:
cX=mean(x);cY=mean(y);cZ=mean(z);
Now, I would you like create (and plot) a CUBE that inglobe all points of matrix A. The CUBE must have follows features:
1. The cube must have the minimal volume that ALL points of A are internal
2. The CENTER of cube must match with the centroid [cX,cY,cZ] of points
The problem is simple but when you don't know well MatLab is all so difficult !!! =)
Thank,
Raff88

Answers (0)

Categories

Asked:

on 18 Jul 2014

Community Treasure Hunt

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

Start Hunting!