This a translation of the ToyFDTD c code available from the web site http://www.borg.umn.edu/toyfdtd/ToyFDTD1.html This some optimization to use MATLAB matrix notation. Others may find a way to further optimize the nested loops.