%% Prognosability of Data in Cell Array of Matrices
% In this example, consider the lifetime data of 10 identical machines with the following 6 potential condition indicators-constant, linear, quadratic, cubic, logarithmic, and periodic. The data set machineDataCellArray.mat contains C which is a 1x10 cell array of matrices where each element of the cell array is a matrix that contains the lifetime data of a machine. For each matrix in the cell array, the first column contains the time while the other columns contain the data variables.
% Load the lifetime data and visualize it against time.

load('machineDataCellArray.mat','C')
display(C)
for k = 1:length(C)
    plot(C{k}(:,1), C{k}(:,2:end));
    hold on;
end

% Observe the 6 different condition indicators–constant, linear, quadratic, cubic, logarithmic, and periodic–for all 10 machines on the plot.
%
% Visualize the prognosability of the potential condition indicators.

prognosability(C)

% From the histogram plot, observe that the features Var2, Var4 and Var5 rank better than the others. Hence, these features are more appropriate for remaining useful life predictions since they are the best indicators of machine health.
% Copyright 2018 The MathWorks, Inc.
%