Code covered by the BSD License  

Highlights from
Visualization Tools for Process Condition Monitoring

image thumbnail

Visualization Tools for Process Condition Monitoring

by

 

21 Mar 2003 (Updated )

MATLAB Graphics and solid visualization tools for statistical analysis.

compute_ellipsoid(M,C)
function [x,y,z] = compute_ellipsoid(M,C)
%COMPUTE_ELLIPSOID is a subroutine than computes the surface points of a
% 2 standard deviations (95% confidence) ellipsoid coresponding to the provided
% mean (M) and covariance (C) data.

[U,L] = eig(C);
%
%     For 2 standard deviation spread of data, the radii of the ellipsoid will
%     be given by 2*SQRT(eigenvalues).

radii = 2*sqrt(diag(L)); 
[xc,yc,zc] = ellipsoid(0,0,0,radii(1),radii(2),radii(3),50);
%
a = kron(U(:,1),xc); b = kron(U(:,2),yc); c = kron(U(:,3),zc);
data = a+b+c; 
n = size(data,2);
x = data(1:n,:)+M(1); 
y = data(n+1:2*n,:)+M(2); 
z = data(2*n+1:end,:)+M(3);
%--------------------------------------------------------------------------

Contact us