To plot the shape of an airfoil from an Excel file in MATLAB with the same scale in the x and y directions, you can follow these steps:
Load the data from the Excel file into MATLAB using the "xlsread" function. For example:
main.m34 chars2 lines
This assumes that the first column of the Excel file contains the x-coordinates and the second column contains the y-coordinates.
Plot the airfoil using the "plot" function with the "axis equal" command to ensure that the x and y axes have the same scale. For example:
main.m24 chars3 lines
This will plot the airfoil using the x-coordinates as the horizontal axis and the y-coordinates as the vertical axis with the same scale.
Here's the complete code:
main.m58 chars4 lines
Make sure to replace "airfoil.xlsx" with the actual name of your Excel file.
gistlibby LogSnag