%% sweep_polar.m % Script scans polar directory for all completed airfoils. If the polar % data appears to be incomplete, the file is deleted. airfoils = struct('name',0,'coord',0,'polar',... struct('alfa',0,'cl',0,'cd',0,'cm',0)); dirlist = dir('complete/*.polar'); n = 0; for ii = 1:length(dirlist) fname = dirlist(ii).name; [alfa,cl,cd,cm] = parse_polar(fname); if length(alfa)>0 n= n+1; airfoils(n).name = fname(1:(length(fname)-6)); airfoils(n).polar.alfa = alfa; airfoils(n).polar.cl = cl; airfoils(n).polar.cd = cd; airfoils(n).polar.cm = cm; disp(['Loading: ',fname]) end end