There are multiple ways to do this in MATLAB. Here is one approach using the "NACA four-digit Airfoil Generator" from MATLAB Central File Exchange:
main.m29 chars2 lines
main.m18 chars2 lines
This will create a 2D plot of the airfoil shape. You can customize the plot appearance using various "plot" function parameters.
Note: There are other ways to generate and plot airfoil shapes in MATLAB as well, such as using built-in functions like "cosspace" and "tan" to create point distributions and calculate airfoil coordinates from them. You can also import airfoil data from external sources and plot them in MATLAB.
gistlibby LogSnag