frudawski

plotspecrange

The plotspecrange function creates a statistical evaluation of an arbitrary number of spectra and plots the mean values, standard deviation (SD) and the minima and maxima values.

Usage:

x = plotspecrange(lam,spec,'parameter','value')

Where:

ParameterDescription
xIs a return struct containing the mean values, stadard deviation and minima and maxima values.
lamSpecifies the spectra wavelengths, vector.
specIs the input spectra vector or matrix.
'color'
(optional)
Defines the plot base color, 1\times 3 vector.
default: [0 0.6 0.9]
'legend'
(optional)
Sets the legend mode:
‘on’ default
‘off’

Examples

Plot diverse black body planck spectra:

lam = 380:780;
T = [3000 4500:100:5500 6000];
spec = planck(T,lam);
plotspecrange(lam,spec);

See also: planck

Result:

Plot diverse daylight spectra in a specified colour:

lam = 380:780;
T = [5000:1000:15000];
spec = ciecct2spec(T,lam);
plotspecrange(lam,spec,'color',[0.8 0.6 0.4]);

See also: ciecct2spec

Result:

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.