File Exchange

image thumbnail

Tiny FDTD v1.0

version (1.79 KB) by Nick Clark
Minimal acoustics simulation in 1, 2 or 3D


Updated 07 Aug 2008

View License

This is a very minimal, acoustic, multidimensional FDTD simulation in under 25 lines of code. The FDTD calculations are actually performed using very few commands (the number of dimensions of your simulation +1). The source is a ‘hard source’ Gaussian pulse and there are no boundary conditions, or anything else to complicate the script as yet. This hopefully makes each process is very obvious. Pressure and Velocity field calculations are vectorized for efficiency and compact code. The output is animated over time.

This script is supplied ready to run. Just hit F5. The code is supplied in 2 dimensions, but, this can be changed to 1D or 3D with a couple of simple copy/paste and edits.

Enjoy! (email:

Cite As

Nick Clark (2021). Tiny FDTD v1.0 (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (18)

Alexander Jones

Hey, i'm trying to impose a hexagonal boundry for reflections but am having trouble as to how to define them in this code.
Any help would be greatly appreciated


Oh my, I like that wave propagating animation!
That's great, but FDTD code is quite different with me.. I just started to learn.
How is that short to make it. Awesome

Joshua Elliott

jesus maestre

hello , who can pass me the program ?, I need it urgently .



Hi, I'm looking for a programme to create an 2D FDTD.

Could you help me, please?




Nayyar Mehmood

very great job ...


awesome keep it up!

Rico Sympotein

Fantastic, makes FDTD very accessible. Easily modifiable source and other parameters. Thanks!


Simple and effective!!!

amit shelke

simple and good!!!can u give the reference plzz???

m cha

v good. simple

M Pi

Damon McCartney

David Steckler

Excellent, awesome, Very good

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

Community Treasure Hunt

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

Start Hunting!