MATLAB interface to W. Wiscombe's Mie scattering program

This is a pre-compiled MEX for MIEV0 program - one of the most well-tested codes for calculating eletromagnetic scattering from a sphere.
14 Downloads
Updated 19 Sep 2025

View License

https://doi.org/10.5281/zenodo.17069741
Original MIEV0 program by Dr. Warren J. Wiscombe is widely known to be one of the most well-tested codes for calculating eletromagnetic scattering from a homogeneous sphere. Current repo aims at providing modern interface to this highly efficient and a de-facto reference Mie theory implementation, so that one could easily call it from MATLAB environment - either for research, or for education purposes.
Features
All capabilities of the original MIEV0 program are retained. The following quantities are computed:
  • scattering Qsca and extinction Qext efficiencies;
  • asymmetry factor Gqsc;
  • forward- and backscatter amplitudes (SFORW and SBACK);
  • scattering amplitudes vs. scattering angle for incident polarization perpendicular S1 and parallel S2 to the plane of scattering;
  • coefficients in the Legendre polynomial expansions of either the unpolarized phase function or the polarized phase matrix (PMOM);
  • and some other quantities related to polarized radiative transfer and resonance hitting.
Usage
At the moment, library is available as binary MEX file for several platforms: modern Windows (x64), legacy Windows (x86), Linux (x64), and MATLAB Online (including MATLAB Mobile). All enumerated binaries are bundled with the download.
  1. To use the library, put appropiate MEX file (e.g. mlMIEV0.mexw64 for Win64, or mlMIEV0.mexa64 for Linux and MATLAB Online) into your project folder.
  2. Create a MATLAB script, in which input parameters will be defined, or use an existing one (e.g. example_scattered_intensities.m bundled with the binary files).
  3. Call mlMIEV0 as you would call any MATLAB function with appropriate input and output argument list:
[Qext, Qsca, Gqsc, S1, S2, Sforw, Sback, Tforw, Tback, Spike, PMOM] = ...
mlMIEV0(XX, Crefin, Perfct, Mimcut, Anyang, Numang, Xmu, Nmom, Ipolzn, Momdim, Prnt, Verbose);
Argument list fully corresponds to the original MIEV0 parameter list, which can be found in the attached original PDF manual and NCAR report authored by Dr. W. Wiscombe. One exception is the last "Verbose" argument which enables some additional output from the MATLAB-Fortran MEX interface.
If you use this code, please make a reference to the original W. Wiscombe Appl. Opt. 1980 paper.
References
  1. Wiscombe, W. Mie Scattering Calculations - Advances in Technique And Fast, Vector-Speed Computer Codes, Ncar Tech Note TN-140+STR, National Center For Atmospheric Research, Boulder, Colorado (1979).
  2. Wiscombe, W. Improved Mie scattering algorithms, Appl. Opt. 19, 1505-1509 (1980).
  3. Van De Hulst. "Light Scattering by Small Particles," Dover Press, New York (1957, 1982).
  4. Bohren, C. and Huffman, D. "Absorption and Scattering of Light by Small Particles," Wiley, New York (1983).
The MEX interface mlMIEV0 and its source code is freely distributed under MIT license on GitHub: https://github.com/ilopushenko/miev0_matlab_interface/ and Zenodo: https://doi.org/10.5281/zenodo.17069741.
Original MIEV0 program fully belongs to Dr. Warren J. Wiscombe, 1979, 1996.

Cite As

Ivan Lopushenko (2025). MATLAB interface to W. Wiscombe's Mie scattering program (https://se.mathworks.com/matlabcentral/fileexchange/181979-matlab-interface-to-w-wiscombe-s-mie-scattering-program), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with R2011a and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.2.0

Implemented interleaved MEX API, as well as Linux version for MATLAB R2023b+, including MATLAB Online support

1.1.1

update description

1.1