specvar

The specvar functions determines the variance and standard deviation of an arbitrary number of input spectra.

See also: plotspecrange

Usage:

v = specvar(lam,spec)

Where:

ParameterDescription
vReturn struct for a series of spectra containing the fields:
– min: minimum spectral data
– max: maximum spectral data
– mean: average spectral data
– SD: standard deviation of spectral data
lamSpecifies the wavelengths, vector or matrix.
specSpecifies the spectral power distribution(s), vector or matrix.

Examples

Determine the spectral variance for a series of 10 pseudo measurements of V(\lambda) filters:

% create pseudo measurement data
lam = 380:780;
A = ciespec(lam,'A');
% create spectrum copies
A = repmat(A,10,1);
% randomly shift reference A spectra
A = A + rand(size(A));

% determine spectral spread
v = specvar(lam,A)

Exemplary result:

 struct with fields:

     min: [ … ] (1×401 double)
     max: [ … ] (1×401 double)
    mean: [ … ] (1×401 double)
      SD: [ … ] (1×401 double)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.