corrspecengine
Purpose
This function is the primary calculational engine for the
function corrspec. It calculates the correlation maps and related matrices
corrected for previously determined pure variables.
Synopsis
matrix = corrspecengine(data_x,data_y,purvar_index,offset,
matrix_options);
Description
Calculates the matrices (weigh matrix, dispersion matrix and
max matrix) needed for corrspec corrected for previously determined pure
variables.
INPUTS:
data_x : (2-way array class "double" or
"dataset") x-matrix for dispersion matrix.
data_y : (2-way array class "double" or
"dataset") y-matrix for dispersion matrix.
purvar_index :
indices of maximum value in purity_values, i.e. the index of the pure
variables. First column for x data, second column for y data. Empty when no
pure variables have been chosen yet. When base_x is a single number n, the
program calculates the first n pure purity_indices.
offset : noise correction factor. One element
defines offset for both x and y, two elements separately for x and y.
max : if not given, only weight matrix will be calculated, otherwise
it contains 2 elements: the options the dispersion_matrix and the max_matrix:
1:
standardized, offset corrected
2:
length sqrt(nrows), offset corrected
3:
purity about mean, offset corrected
4:
purity about origin, offset corrected
5:
asynchronous, offset corrected
OUTPUTS:
matrix : cell array with either one or three
matrices, with size [ncols_y ncols_x] (ncols_y represents number of spectra in
y, etc.).
matrix{1}:
weight_matrix, matrix used to correct for previously selected pure
variables.
matrix{2}:
dispersion_matrix, matrix of interest, generally correlation matrix,
corrected for previously selected pure variables.
matrix{3}:
max_matrix, matrix from which pure variables are chosen, generally a
co-purity matrix corrected for previously selected pure variables.
See Also
corrspec, dispmat