Combine end-members so as to obtain mixed spectra.

Contents

Syntax

    Q = mix_spectra(Abundances, Indexes, Endmembers);
    Q = mix_spectra(Abundances, Indexes, Endmembers, numMaterials);
    Q = mix_spectra(Abundances, Indexes, Endmembers, numMaterials, normalise);

Description:

    Mix the spectra given a set of abundances, indexes and endmembers. This is, effectively, 
    the inverse operation to unmixing.

Inputs:

    Abundances: Matrix containign the abundance coefficients per endmember. This is a
        cols x rows x endmembers matrix, where the output matrix Q is cols x rows x bands.
    Indexes: Matrix containing the indexes for the endmembers.
    Endmembers: Matrix whose rows are indexed to the end members and columns to the
        wavelength, i.e. Endmember(i,:) contains the ith end member spectrum.
    numMaterials: Number of materials used for the recovery of the spectra. If
        this is not provided, the size of 3rd dimension of the abundance matrix is used.
    normalise: If normalise is unity, the output spectra is normalised accordingly,
                  i.e. norm(Q(i,i),3) is equivalent to 1. The default is 1.

Outputs:

    Q: Matrix of mixed spectra.

See also:

    L2_unmixing