Stokes Polarization
Version 0.5.0 (7.95 KB) by
Ivan Lopushenko
MATLAB class to extract parameters of polarized light from Stokes vector measurements
This is a small app to compute and visualize parameters of either fully or partially polarized light from the supplied Stokes vector.
Intented usage: evaluation of all common parameters of polarized light (like degrees of polarization, intensity values, Wolf's coherency matrix, azimuth, ellipticity and axes of the polarization ellipse) from Stokes vector, assuming that any other information (e.g., field complex vector) is not available. With this assumption, usage of the MATLAB Phased Array System toolbox can be either unconvenient, or not always possible.
Provided code allows to plot intensity-dependent polarization ellipse for each supplied Stokes vector, as well as to depict polarization state normalized to the intensity of the fully polarized part on the Poincaré sphere.
Input data: can be either single beam with polarization state defined as
row or column vector, or several beams defined as matrix with N specified polarization states:
All input parameters must have one unit system (user-defined).
It is not necessary to make an instance of the class in order to use it. Main functions are available as element-wise static methods of the class, so if you need to e.g. compute only azimuth of the polarization ellipse, you can call
psi = StokesVectorSet.evaluateAzimuth(S1,S2);
and obtain it. For the full list of static methods, please refer to the source code.
Compatibility: both example and class files have been tested in MATLAB R2021b. Some earlier versions of MATLAB (below R2016b, for the current implementation of the class) do not support serialization to tables. All other functionality is available (if not, please let me know).
WebAssembly version: this code has been compiled to run in web browser with MATLAB Coder and Emscripten, and is available as online tool. More information, including short overview of theory, is also available in the online tool.
References: all equations within code are enumerated with respect to
M. Born and E. Wolf. Principles of Optics, 6th Edition. Pergamon Press (1980).
Cite As
Ivan Lopushenko (2025). Stokes Polarization (https://se.mathworks.com/matlabcentral/fileexchange/162151-stokes-polarization), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2021b
Compatible with R2016b and later releases
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 0.5.0 |
