% Reads data from file rdata.csv and plots them along with the enclosing
% ellipse which is created with function gellipse
%   Minas Spetsakis Nov. 2016

D=csvread('rdata.csv');
mu = mean(D);
   % multiplying by 9 is optional
C  = 9*cov(D);
[x,y,z] = gellipse(mu,C,80);
   % One can use mesh or surf, but plot3 makes it transparent
plot3(x,y,z);
hold on
scatter3(D(:,1),D(:,2),D(:,3));
hold off;
