File Exchange

image thumbnail

Transmittance and Reflectance Spectra of Multilayered Dielectric Stack using Transfer Matrix Method

version (6.64 KB) by Sathyanarayan Rao
Transfer Matrix Method is used to calculate transmittance and reflectance of dielectric layers.


Updated 07 Jul 2016

View License

Transfer Matrix Method is a commonly used tool in Optics. Here it is applied to a dielectric stack. Redheffer star product is used to combine scattering matrices of different layers. At the end for a range of wavelength , I plot transmittance and reflectance spectrum. I have referred the following links to make this code.
Ref (1):
Ref (2):

Cite As

Sathyanarayan Rao (2020). Transmittance and Reflectance Spectra of Multilayered Dielectric Stack using Transfer Matrix Method (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (20)

Jack Blauert is right. The Reflection Scattering matrix and the initialization of the Sg haven't been included in the loop iterating over different wavelengths. Simple Cut-Paste fixes the problem.

Abram Falk

The code is wrong

ping bai

Very well code. But how to update this code if I want to calculate one layer with complex permittivity as a function of wavelength? Thanks!

Jack Jack

very well,thanks a lot.It is very useful for me to study the Transmission Matrix Method with MATLAB!!!

Yixuan Ma

codes maybe are wrong for changing the range of wavelength

The reason the code doesn't work is that the global scattering matrix is not being reset for each wave vector. You can fix this by moving the wave vector loop to include setting the global scattering matrix to the reset values.

S.Q. Li

Abol Hol

Code is wrong! change wavelength step or range youll see

Hi, I would like to know if its possible to have complex permittivities for each layers.


Values change for same wavelength when changing wavelength steps.



Complex permittivy are OK ?

Are you sure about the position of the Lambda loop? I do your code the scatering matrices are updated more often than they should and you get a different refelctance for the same wavelength if you just change the section. 100nm to 130nm looks a lot different than 90 to 130nm. Is is consistent you think?
Thanks a lot and kind regards


Ben Johns




JongBin Yeo

Karl Wiese


A sign error in line 115 is corrected from X=expm(-Om*k0(q)*L(i)) to X=expm(Om*k0(q)*L(i));

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux