% 
%        XFOIL         Version 6.96
%   
%  Calculated polar for: NACA 0012 AIRFOILS                              
%   
%  1 1 Reynolds number fixed          Mach number fixed         
%   
%  xtrf =   1.000 (top)        1.000 (bottom)  
%  Mach =   0.000     Re =     1.000 e 6     Ncrit =   9.000
%   
%    alpha    CL        CD       CDp       CM     Top_Xtr  Bot_Xtr
%   ------ -------- --------- --------- -------- -------- --------
TABLE = [-18.500  -1.2258   0.10236   0.09929  -0.0012   1.0000   0.0135;...
 -18.250  -1.2456   0.09505   0.09187  -0.0049   1.0000   0.0136;...
 -18.000  -1.2659   0.08782   0.08451  -0.0086   1.0000   0.0136;...
 -17.750  -1.2852   0.08088   0.07744  -0.0121   1.0000   0.0136;...
 -17.500  -1.3031   0.07429   0.07074  -0.0154   1.0000   0.0137;...
 -17.250  -1.3193   0.06814   0.06446  -0.0185   1.0000   0.0137;...
 -17.000  -1.3322   0.06256   0.05874  -0.0213   1.0000   0.0137;...
 -16.750  -1.3427   0.05745   0.05351  -0.0238   1.0000   0.0138;...
 -16.500  -1.3519   0.05263   0.04856  -0.0261   1.0000   0.0139;...
 -16.250  -1.3687   0.04704   0.04283  -0.0285   1.0000   0.0140;...
 -16.000  -1.3806   0.04234   0.03800  -0.0303   1.0000   0.0142;...
 -15.750  -1.3868   0.03865   0.03420  -0.0313   1.0000   0.0144;...
 -15.500  -1.3879   0.03577   0.03122  -0.0317   1.0000   0.0146;...
 -15.250  -1.3854   0.03348   0.02885  -0.0317   1.0000   0.0148;...
 -15.000  -1.3802   0.03160   0.02690  -0.0313   1.0000   0.0151;...
 -14.750  -1.3739   0.02997   0.02518  -0.0305   1.0000   0.0153;...
 -14.500  -1.3669   0.02849   0.02363  -0.0295   1.0000   0.0156;...
 -14.250  -1.3590   0.02718   0.02223  -0.0283   1.0000   0.0159;...
 -14.000  -1.3502   0.02602   0.02099  -0.0268   1.0000   0.0162;...
 -13.750  -1.3399   0.02502   0.01991  -0.0252   1.0000   0.0164;...
 -13.500  -1.3281   0.02416   0.01896  -0.0236   1.0000   0.0167;...
 -13.250  -1.3149   0.02343   0.01816  -0.0219   1.0000   0.0169;...
 -13.000  -1.3132   0.02207   0.01670  -0.0187   1.0000   0.0174;...
 -12.750  -1.3004   0.02117   0.01576  -0.0169   1.0000   0.0179;...
 -12.500  -1.2834   0.02049   0.01504  -0.0156   1.0000   0.0183;...
 -12.250  -1.2649   0.01988   0.01438  -0.0144   1.0000   0.0188;...
 -12.000  -1.2455   0.01931   0.01376  -0.0134   1.0000   0.0194;...
 -11.750  -1.2250   0.01881   0.01321  -0.0124   1.0000   0.0199;...
 -11.500  -1.2032   0.01839   0.01274  -0.0116   1.0000   0.0203;...
 -11.250  -1.1872   0.01745   0.01175  -0.0101   1.0000   0.0213;...
 -11.000  -1.1666   0.01690   0.01118  -0.0091   1.0000   0.0220;...
 -10.750  -1.1449   0.01645   0.01069  -0.0082   1.0000   0.0228;...
 -10.500  -1.1228   0.01602   0.01023  -0.0074   1.0000   0.0236;...
 -10.250  -1.1000   0.01566   0.00982  -0.0066   1.0000   0.0242;...
 -10.000  -1.0807   0.01499   0.00912  -0.0053   1.0000   0.0255;...
  -9.750  -1.0591   0.01456   0.00868  -0.0043   1.0000   0.0266;...
  -9.500  -1.0368   0.01423   0.00833  -0.0034   1.0000   0.0278;...
  -9.250  -1.0143   0.01395   0.00801  -0.0024   1.0000   0.0288;...
  -9.000  -0.9948   0.01341   0.00747  -0.0010   1.0000   0.0306;...
  -8.750  -0.9735   0.01307   0.00712   0.0002   1.0000   0.0322;...
  -8.500  -0.9517   0.01279   0.00682   0.0014   1.0000   0.0337;...
  -8.250  -0.9313   0.01240   0.00642   0.0027   1.0000   0.0358;...
  -8.000  -0.9104   0.01209   0.00612   0.0040   1.0000   0.0382;...
  -7.750  -0.8888   0.01187   0.00587   0.0052   1.0000   0.0401;...
  -7.500  -0.8687   0.01149   0.00552   0.0067   1.0000   0.0435;...
  -7.250  -0.8475   0.01124   0.00527   0.0080   1.0000   0.0464;...
  -7.000  -0.8268   0.01095   0.00500   0.0093   1.0000   0.0505;...
  -6.750  -0.7975   0.01069   0.00475   0.0088   0.9992   0.0550;...
  -6.500  -0.7634   0.01034   0.00446   0.0073   0.9975   0.0624;...
  -6.250  -0.7289   0.01003   0.00419   0.0058   0.9959   0.0709;...
  -6.000  -0.6939   0.00973   0.00395   0.0041   0.9944   0.0815;...
  -5.750  -0.6601   0.00942   0.00371   0.0026   0.9924   0.0940;...
  -5.500  -0.6268   0.00911   0.00348   0.0014   0.9897   0.1090;...
  -5.000  -0.5571   0.00847   0.00304  -0.0019   0.9853   0.1490;...
  -4.750  -0.5213   0.00816   0.00284  -0.0038   0.9836   0.1728;...
  -4.500  -0.4903   0.00786   0.00266  -0.0045   0.9789   0.1984;...
  -4.250  -0.4588   0.00756   0.00248  -0.0053   0.9738   0.2257;...
  -4.000  -0.4276   0.00728   0.00232  -0.0061   0.9687   0.2535;...
  -3.750  -0.4004   0.00705   0.00217  -0.0058   0.9599   0.2804;...
  -3.500  -0.3730   0.00681   0.00204  -0.0057   0.9511   0.3089;...
  -3.250  -0.3462   0.00659   0.00191  -0.0053   0.9409   0.3366;...
  -3.000  -0.3201   0.00640   0.00180  -0.0048   0.9284   0.3637;...
  -2.750  -0.2938   0.00623   0.00170  -0.0043   0.9152   0.3920;...
  -2.500  -0.2675   0.00606   0.00160  -0.0038   0.9007   0.4195;...
  -2.250  -0.2410   0.00593   0.00151  -0.0034   0.8848   0.4469;...
  -2.000  -0.2144   0.00581   0.00144  -0.0030   0.8675   0.4744;...
  -1.750  -0.1878   0.00570   0.00137  -0.0025   0.8486   0.5014;...
  -1.500  -0.1611   0.00562   0.00131  -0.0021   0.8283   0.5286;...
  -1.250  -0.1343   0.00556   0.00126  -0.0018   0.8072   0.5556;...
  -1.000  -0.1075   0.00549   0.00122  -0.0014   0.7848   0.5826;...
  -0.750  -0.0806   0.00546   0.00118  -0.0010   0.7610   0.6087;...
  -0.500  -0.0538   0.00542   0.00116  -0.0007   0.7373   0.6352;...
  -0.250  -0.0268   0.00541   0.00115  -0.0004   0.7123   0.6609;...
   0.000   0.0000   0.00540   0.00114   0.0000   0.6872   0.6873;...
   0.250   0.0269   0.00541   0.00115   0.0003   0.6611   0.7123;...
   0.500   0.0538   0.00542   0.00116   0.0007   0.6353   0.7372;...
   0.750   0.0806   0.00546   0.00118   0.0010   0.6088   0.7609;...
   1.000   0.1075   0.00549   0.00122   0.0014   0.5826   0.7847;...
   1.250   0.1344   0.00555   0.00126   0.0018   0.5560   0.8071;...
   1.500   0.1611   0.00562   0.00131   0.0021   0.5281   0.8282;...
   1.750   0.1878   0.00570   0.00137   0.0025   0.5018   0.8484;...
   2.000   0.2144   0.00581   0.00144   0.0030   0.4743   0.8675;...
   2.250   0.2410   0.00593   0.00151   0.0034   0.4468   0.8848;...
   2.500   0.2675   0.00606   0.00160   0.0038   0.4196   0.9007;...
   2.750   0.2938   0.00623   0.00170   0.0043   0.3917   0.9152;...
   3.000   0.3201   0.00640   0.00180   0.0048   0.3637   0.9285;...
   3.250   0.3462   0.00659   0.00191   0.0053   0.3366   0.9409;...
   3.500   0.3730   0.00681   0.00204   0.0057   0.3090   0.9511;...
   3.750   0.4004   0.00705   0.00218   0.0058   0.2803   0.9599;...
   4.000   0.4276   0.00728   0.00232   0.0061   0.2536   0.9688;...
   4.250   0.4588   0.00756   0.00248   0.0053   0.2255   0.9738;...
   4.500   0.4903   0.00786   0.00265   0.0045   0.1986   0.9789;...
   4.750   0.5213   0.00816   0.00284   0.0038   0.1728   0.9836;...
   5.000   0.5572   0.00847   0.00304   0.0019   0.1488   0.9853;...
   5.500   0.6268   0.00911   0.00348  -0.0014   0.1090   0.9897;...
   5.750   0.6601   0.00942   0.00371  -0.0027   0.0939   0.9924;...
   6.000   0.6940   0.00972   0.00395  -0.0041   0.0816   0.9944;...
   6.250   0.7290   0.01003   0.00419  -0.0058   0.0709   0.9959;...
   6.500   0.7635   0.01034   0.00446  -0.0074   0.0624   0.9976;...
   6.750   0.7976   0.01069   0.00475  -0.0089   0.0550   0.9992;...
   7.000   0.8267   0.01095   0.00499  -0.0093   0.0505   1.0000;...
   7.250   0.8474   0.01124   0.00527  -0.0080   0.0464   1.0000;...
   7.500   0.8686   0.01149   0.00552  -0.0067   0.0435   1.0000;...
   7.750   0.8887   0.01186   0.00587  -0.0052   0.0401   1.0000;...
   8.000   0.9103   0.01208   0.00612  -0.0040   0.0382   1.0000;...
   8.250   0.9312   0.01240   0.00642  -0.0027   0.0359   1.0000;...
   8.500   0.9516   0.01279   0.00682  -0.0013   0.0337   1.0000;...
   8.750   0.9734   0.01307   0.00712  -0.0002   0.0322   1.0000;...
   9.000   0.9948   0.01341   0.00747   0.0010   0.0306   1.0000;...
   9.250   1.0143   0.01395   0.00801   0.0024   0.0288   1.0000;...
   9.500   1.0368   0.01423   0.00832   0.0034   0.0278   1.0000;...
   9.750   1.0591   0.01456   0.00868   0.0043   0.0266   1.0000;...
  10.000   1.0808   0.01499   0.00912   0.0053   0.0255   1.0000;...
  10.250   1.1001   0.01566   0.00982   0.0066   0.0242   1.0000;...
  10.500   1.1229   0.01602   0.01023   0.0074   0.0236   1.0000;...
  10.750   1.1450   0.01645   0.01069   0.0082   0.0228   1.0000;...
  11.000   1.1668   0.01690   0.01118   0.0091   0.0220   1.0000;...
  11.250   1.1874   0.01745   0.01175   0.0100   0.0213   1.0000;...
  11.500   1.2033   0.01840   0.01274   0.0116   0.0203   1.0000;...
  11.750   1.2251   0.01881   0.01321   0.0124   0.0199   1.0000;...
  12.000   1.2457   0.01931   0.01376   0.0133   0.0194   1.0000;...
  12.250   1.2651   0.01988   0.01438   0.0144   0.0188   1.0000;...
  12.500   1.2837   0.02049   0.01504   0.0155   0.0183   1.0000;...
  12.750   1.3008   0.02117   0.01576   0.0168   0.0179   1.0000;...
  13.000   1.3137   0.02207   0.01670   0.0186   0.0174   1.0000;...
  13.250   1.3157   0.02342   0.01815   0.0218   0.0169   1.0000;...
  13.500   1.3290   0.02415   0.01895   0.0235   0.0167   1.0000;...
  13.750   1.3406   0.02502   0.01991   0.0251   0.0164   1.0000;...
  14.000   1.3509   0.02602   0.02099   0.0267   0.0162   1.0000;...
  14.250   1.3600   0.02717   0.02222   0.0281   0.0159   1.0000;...
  14.500   1.3679   0.02848   0.02361   0.0294   0.0156   1.0000;...
  14.750   1.3750   0.02995   0.02516   0.0304   0.0153   1.0000;...
  15.000   1.3814   0.03158   0.02687   0.0311   0.0151   1.0000;...
  15.250   1.3864   0.03348   0.02885   0.0315   0.0148   1.0000;...
  15.500   1.3892   0.03575   0.03121   0.0315   0.0146   1.0000;...
  15.750   1.3881   0.03863   0.03418   0.0311   0.0144   1.0000;...
  16.000   1.3818   0.04235   0.03800   0.0300   0.0142   1.0000;...
  16.250   1.3702   0.04702   0.04280   0.0282   0.0140   1.0000;...
  16.500   1.3536   0.05261   0.04854   0.0258   0.0139   1.0000;...
  16.750   1.3451   0.05734   0.05340   0.0235   0.0138   1.0000;...
  17.000   1.3352   0.06237   0.05856   0.0211   0.0137   1.0000;...
  17.250   1.3218   0.06802   0.06434   0.0182   0.0137   1.0000;...
  17.500   1.3059   0.07416   0.07060   0.0152   0.0136   1.0000;...
  17.750   1.2880   0.08075   0.07731   0.0118   0.0136   1.0000;...
  18.000   1.2685   0.08773   0.08442   0.0083   0.0136   1.0000;...
  18.250   1.2485   0.09493   0.09174   0.0046   0.0136   1.0000;...
  18.500   1.2284   0.10229   0.09922   0.0008   0.0135   1.0000];

Alpha = TABLE(:,1);
CL = TABLE(:,2);
CD = TABLE(:,3);

figure()
hold on
plot(Alpha,CL)
plot(Alpha,CD,'--')
title('Charracteristics of NACA 0012, (Re = 1e6)')
xlabel ('angle of attack \alpha (°)')
ylabel('Lift (C_L, full line) and Drag (C_D, dotted line) Coefficients')
