主要内容

refractiveIndex

Compute complex refractive index for optical material

Since R2026a

Description

Add-On Required: This feature requires the Optical Design and Simulation Library for Image Processing Toolbox add-on.

complexRefractiveIndex = refractiveIndex(material,lambdas) returns the complex index of refraction at the specified wavelengths lambdas for an optical material, material.

example

Examples

collapse all

Load a material from the glass library using the pickGlass function.

om = pickGlass("K-BK7");

Define wavelengths for which to compute the complex refractive index.

lambdas = 600:10:1200;

Compute the complex refractive index of the material.

complexIndex = refractiveIndex(om,lambdas);

Compute the real value of the complex refractive index.

Nd = real(complexIndex);

Compute the imaginary value of the complex refractive index, or the extinction coefficient.

k = imag(complexIndex);

Plot the real value of the complex refractive index on the left axis and the extinction coefficient on the left axis, as a function of wavelength.

yyaxis left
plot(lambdas,Nd)
ylabel("Refractive Index (n_d)");
yyaxis right
plot(lambdas,k)
ylabel("Extinction Coefficient (k)");
xlabel("Wavelength (nm)");

Figure contains an axes object. The axes object with xlabel Wavelength (nm), ylabel Extinction Coefficient (k) contains 2 objects of type line.

Input Arguments

collapse all

Optical material, specified as an opticalMaterial object.

Wavelengths for which to compute the refractive index, specified as an M-element numeric vector. M is the number of wavelengths, and each element of the vector is a wavelength, in nanometers.

Output Arguments

collapse all

Complex refractive index, returned as an M-element numeric vector. M is the number of wavelengths, and each element of the vector corresponds to the complex refractive index at the corresponding wavelength in lambdas. The complex refractive index equation is

n˜=n+ik,

where n is the real part of the refractive index, representing the phase velocity of light in the optical material. The refractiveIndex function computes n using the dispersion formula specified by the RefractiveIndexMethod property of the opticalMaterial object. k is the imaginary part of the refractive index, or the extinction coefficient, which describes the attenuation or absorption of light within the optical material.

Version History

Introduced in R2026a