File Exchange

image thumbnail

GUI for TE/TM electromagnetic plane waves propagation through multilayered structures

version 2.2 (26.6 KB) by

GUI for the analysis of TE/TM E.M. plane waves propagation through multilayered structures



View License

This tool is a GUI for the analysis of the TE/TM plane waves propagation through structures composed by multiple layers with different electromagnetic characteristics.
The GUI provides graphical results as well as detailed calculations of the transmission line equivalent circuit model. Also double-negative materials are supported.
Take a look at the "Help.html" file included into the zip archive for a comprehensive description of the GUI features.
In case of problems and/or bugs, please do not hesitate to contact me. Send me an email also if you would like new features to be implemented.
Version 2.0 new features and bug fixing:
- possibility to input frequency and incidence angle also as vectors: in this case the GUI will iteratively calculate the EM field for each frequency and angle value
- parallel field calculation added (both y and z components)
- figures can be zoomed in and out and single pixel values can be inspected by moving the mouse on the plots
- power reflected by the whole media structure added (percentage of the power incident on the first interface)
- “Close all figures” button added
- bug fixed: use of the TM reflection coefficient in the calculation of reflected and transmitted fields
Version 2.1 new features and bug fixing:
- save the results produced by the GUI into a Matlab workspace (one workspace for each frequency and incidence angle value). See the HTML file attached to this script for the detailed description of the results that are saved to disk.
- all the quantities calculated in the TL model are now relative to the z direction and not the wave propagation direction.
- a bug relative to evanescent waves has been fixed.
Version 2.2 new features and bug fixing:
- now the GUI works also on more recent Matlab versions (from R2014b on)

Comments and Ratings (10)

Kazeem Yinusa

Hi Lorenzo,

I am fond of your GUI !

I would like to know how can I simulate the TFSF formalism in a 3D code. More particularly, I would like to see the propagation of a plane wave in the TFSF thanks to a cutting plane. This is my project of master's degree and I am a beginner in FDTD !

Thanks a lot for your answer !

Best regards,

Paul Kassebaum

Paul Kassebaum (view profile)



Greg (view profile)

Lorenzo, thanks, looks like the right answer now!

Lorenzo Luini

@Greg: The problem arises due to an error in the inputs. If you open the Help of the GUI, you will read for Electric Permittivity:

"Electric permittivity

...Complex values of the electric permittivity (indicating power losses associated to the material) are allowed (the imaginary part has to be negative, according to the temporal convention exp(j*omega*t))..."

This means that the right input in your case should be:
eps = [1 -100-100*j 1]


Greg (view profile)

Hi Lorenzo, Ive noticed what I believe is a mistake:

frequency = 3.23e13
eps = [1 -100+100i 1]
zcoor = [0 -1000E-9]

returns G_ = -1.05+.165i, abs(G_) = 1.066>1. Reflection must be less than 1, so how can this be?

Lorenzo Luini

@Jveer: by the way, just comment all the "impixelinfo" commands in the script to make the GUI work correctly: you won't be able to inspect single pixel values by moving the mouse on the plots, but the GUI will work correctly.

Lorenzo Luini

The bug is probably due to the use of an old Matlab version in which the "impixelinfo" command is not defined yet.


Jveer (view profile)

interesting but has bugs:

??? Undefined function or variable 'impixelinfo'.

Error in ==> PlaneWaveGUI_v2_1>PlaneWave_MultLayer at 1191

Error in ==> PlaneWaveGUI_v2_1>PlaneWaveGUI_v2_1_OpeningFcn at 124

Error in ==> PlaneWaveGUI_v2_1>gui_mainfcn at 4534
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in ==> PlaneWaveGUI_v2_1 at 60
gui_mainfcn(gui_State, varargin{:});



GUI updated to work also on more recent Matlab versions (from R2014b on)


Submission as a Toolbox


Updated to include an App file for R2012b


See the "Description" frame.


See the "Description" frame.


See the "Description" frame.

MATLAB Release
MATLAB 9.1 (R2016b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today