Centroid of an airfoil
Show older comments
clc;clear all;close all
%I separated the data points of the top and the bottom of the airfoil so I
%can use interp1 separately for both
%Data points of the top part of the airfoil
x=[1 0.8518 0.7040 0.5536 0.3988 0.2454 0.0937 0.0199 0.0015 0];
y=[0 0.0355 0.0819 0.1206 0.1347 0.1200 0.0777 0.0363 0.0162 0];
%Data points of the bottom part of the airfoil
x2=[0 0.0169 0.0812 0.2054 0.3525 0.4979 0.6457 0.7974 0.9497 1];
y2=[0 -0.0197 -0.0428 -0.0645 -0.0749 -0.0701 -0.0506 -0.0249 -0.0026 0];
%Smoothing both the top and bottom part of the airfoil using
%interp1('pchip')
xx=linspace(1,0);
yy=interp1(x,y,xx,'pchip');
xx2=linspace(0,1);
yy2=interp1(x2,y2,xx2,'pchip');
%Plotting both my smoothed top and bottom data points into the same plot
figure
plot(xx,yy,'b',xx2,yy2,'b')
grid on
This is what I have come up with so far. How do I find the centroid of this airfoil
1 Comment
Walter Roberson
on 7 Dec 2013
Programs that have "clear all" in them are almost always wrong.
Accepted Answer
More Answers (0)
Categories
Find more on Airfoil tools in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!