First, you need to import the data from Excel to Matlab. This can be done using the xlsread
function. Assuming your data is stored in a file called "airfoil_data.xlsx", the code to import the data would look like this:
main.m130 chars5 lines
Next, you can use the plot
function to plot the airfoil shape. You can simply plot the y
vs. x
data to get the shape of the airfoil. Here's the code:
main.m12 chars2 lines
Finally, if you want to plot the pressure distribution (i.e. cp data) on the airfoil, you can use the contour
function. Here's the code:
main.m19 chars2 lines
You can adjust the contour levels and colormap to make the plot clearer.
gistlibby LogSnag