%% Select Most Informative Hyperspectral Bands
% Read hyperspectral data into the workspace.

hcube = hypercube('paviaU.dat');

% Estimate the endmembers of the data cube by using the FIPPI algorithm.

endmembers = fippi(hcube,9);

% Create a new hypercube consisting of the ten most informative bands.

newhcube = selectBands(hcube,endmembers,'NumberOfBands',10);

% Copyright 2020 The MathWorks, Inc.