image thumbnail

NACA 4 digit Airfoil Generator

version (1.93 KB) by J. Divahar
Generates the NACA 4 digit airfoil coordinates


Updated 12 Feb 2009

View License

"naca4gen.m" Generates the NACA 4 digit airfoil coordinates with desired no. of panels (line elements) on it.

*Accurate coordinate generation with the required precision
*Option to generate closed or open Trailing Edge
*Additional separate outputs for camber line, upper surface and lower surface
*A tst (test) file included

[1] NACA 4 digit designation (eg. '2412')
[2] No of panels (line elements) PER SIDE (upper/lower)
[3] Type of chord station spacing (Half cosine spacing / Uniform spacing)

[1] One can plot the generated airfoil, camber line and the leading edge circle by setting an option input wantPlot=1
[2] A data file can be generated by setting the option input wantFile=1

Being a function, the airfoil generator can be called several times from a loop to generate any number of airfoil data files.

Cite As

J. Divahar (2022). NACA 4 digit Airfoil Generator (, MATLAB Central File Exchange. Retrieved .

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!