The **ciecri **function calculates the general colour rendering index R_a, the special colour rendering indices R_i and the chromaticity difference \text{d}C for a given spectral power distribution (SPD). Any errors in the data set or in results generated with the Lighting Toolbox are not in the liability of the CIE nor me, see licence.

See also: ciecfi

Usage:

[CRI,Ra] = ciecri(lam,spec,reference)

Where:

Parameter | Description |

`CRI` | Is the extended return struct with the following fields:Ra: repesents the general colour rendering index, which is the mean valueof the first 8 special colour rendering indices R_1 – R_8. Ri: represents the 14 special colour rendering indices R_i for the 14 reference test colours.illuminant: specifies the reference illuminant used for the calculation. default: Planck for T_{cp} < 5000 K and daylight for T_cp >= 5000 K.Tcp: gives the correlated colour temperature (CCT) T_{cp} of the test illuminant.dC: represents the chromaticity difference. For meaningful result of R_a,this value sould not exceed 5 \cdot 10^{−3}. |

`Ra` | Returns the general colour rendering index field of the struct. |

`lam` | Is a vector defining the wavelengths. |

`spec` | Is a vector or matrix containing the spectral power distribution of the illuminant(s). For more than one spectrum use a row-wise data matrix. |

`reference` | Allows to specify a certain standard illuminant, see ciespec. default: Planck for T_{cp} < 5000 K and daylight for T_{cp} \geq 5000 K. |

Note: several spectra can be used as input, the output struct than contains for each field as many entries as input spectra.

The individual fields of the CRI struct can be accessed using the dot notation. To acces the Ri field of the struct:

CRI.Ri

**Examples**

**Evaluate the colour rendering index** **for standard illuminant ‘FL4’:**

lam = 360:5:830; spec = ciespec(lam,'FL4'); [CRI,Ra] = ciecri(lam,spec)

See also: ciespec

Result:

CRI = scalar structure containing the fields: Ra = 51 Ri = 42 70 91 38 41 54 64 11 -112 31 18 25 47 94 illuminant = Planck Tcp = 2937.5 dC = 7.6158e-04

**Evaluate the colour rendering index** **for standard illuminant ‘FL12’ and plot the special rendering indices:**

lam = 380:780; spec = ciespec(lam,'FL12'); CRI = ciecri(lam,spec); plotcribar(CRI)

See also: ciespec, plotcribar

Result:

**Evaluate the colour rendering index for standard illuminants ‘FL5’ and ‘HP1’:**

lam = 360:5:830; spec = ciespec(lam,{'FL5','HP1'}); CRI = ciecri(lam,spec)

See also: ciespec

Result:

CRI = scalar structure containing the fields: Ra = 72 8 Ri = 63 -3 80 61 91 40 68 -27 69 -4 76 52 81 21 48 -76 -68 -261 53 43 61 -52 68 27 67 7 94 60 illuminant = { [1,1] = Daylight [1,2] = Planck } Tcp = 6342.9 1959.1 dC = 7.4404e-03 8.0623e-04

**Evaluate the general colour rendering index R_a for standard illuminant ‘LED-B5’:**

lam = 380:780; spec = ciespec(lam,'LED-B5'); [~,Ra] = ciecri(lam,spec)

See also: ciespec

Result:

Ra = 80

**Evaluate the general colour rendering index R_a for standard illuminant ‘LED-B5’ using standard illuminant ‘D65’ as reference light source:**

lam = 380:780; spec = ciespec(lam,'LED-B5'); [~,Ra] = ciecri(lam,spec,'D65')

See also: ciespec

Result:

Ra = 79

**Reference**

`Method of measuring and specifying colour rendering properties of light sources. Commission Internationale de l'Éclairage (CIE), Vienna Austria, 1995, ISBN: 978 3 900734 57 2.`