The specspread functions determines the standard deviation of spectral centroids, also called spectral spread.

See also: speccentroid


spread = specspread(lam,spec)


spreadReturns the spectral spread of a series of spectra.
lamSpecifies the wavelengths, vector or matrix.
specSpecifies the spectral power distribution(s), vector or matrix.


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

% create pseudo measurement data
lam = repmat(380:780,10,1);
VL = ciespec(lam,'VL');
% randomly shift wavelengths
lam = lam + rand(size(lam)).*5;

% determine spectral spread
spread = specspread(lam,VL)

Exemplary result:

spread = 0.1447

Leave a comment

* I accept the use of cookies as well as the terms in the privacy policy. I accept that data provided by me is processed and saved. I know that comments are saved and published after review.