KhachiyanAlgorithmM​ain

Fit ellipsoid to 3d data points using Khachiyan Algorithm. This code will find a minimum volume of ellipsoid which contains set of all the 3
31 Downloads
Updated Mon, 25 Feb 2019 09:14:36 +0000

View License

Example
data= rand(100,3);

output=KhachiyanAlgorithmMain(data);
plot3(data(:,1),data(:,2),data(:,3),'b.')
hold on hsurface=surf(output.x,output.y,output.z,'FaceColor','b','EdgeColor','none','FaceAlpha',0.1);
radii=output.radii;
center=output.center;

% plot principal axis
plot3(output.minor(:,1),output.minor(:,2),output.minor(:,3),'k','linewidth',0.2) plot3(output.major(:,1),output.major(:,2),output.major(:,3),'k','linewidth',5) plot3(output.medium(:,1),output.medium(:,2),output.medium(:,3),'k','linewidth',2)

major_axis_vector=output.major(1,:)-output.major(end,:); medium_axis_vector=output.medium(1,:)-output.medium(end,:); minor_axis_vector=output.minor(1,:)-output.minor(end,:);

Cite As

ankit agrawal (2024). KhachiyanAlgorithmMain (https://www.mathworks.com/matlabcentral/fileexchange/70381-khachiyanalgorithmmain), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0