function plotCapFiles % Reads capillary files % Assign chosen "parameters" to lines 7 to 12, and just run % Capillary files should be in a sub-folder I_O (see line 14) rRatio = 2; nbreTableau = 26; % 2d line of each capillary File, between 24 and 27 : the number % of adimensionned distance values considered for this % rRatio absChoice = 6; % 1=dist*, 2=uc*, 3=V*, 4=f*, 5=delta1, 6=delta2 nDistPerFigure = 14; M = dlmread(['I_O/M(r=',num2str(rRatio),')'],'',2,0); lastLineRead = 0; legende = cell(nDistPerFigure,1); close all xlabList= cell(6,1); xlabList(1)=cellstr('d* (-)');xlabList(2)=cellstr('u_c* (-)');xlabList(3)=cellstr('V* (-)'); xlabList(4)=cellstr('f* (-)');xlabList(5)=cellstr('\delta_1 (deg)');xlabList(6)=cellstr('\delta_2 (deg)'); for i =1:nbreTableau figure(floor((i-1)/nDistPerFigure)+1) colors = hsv(nDistPerFigure); ylabel('u_c* (-)');xlabel(xlabList(absChoice));hold on;title(['r = ',num2str(rRatio)]); nbreValSuc_D = M(lastLineRead+1,1); table_D = M(lastLineRead+2:lastLineRead+1 + nbreValSuc_D,:); distStar = table_D(:,1); if ~isempty(find(distStar ~= distStar(1),1)) error(['distStar different from ',num2str(distStar(1)),' in Table read !']) end distStar = distStar(1); if rem(i,nDistPerFigure) ~=0 legende(rem(i,nDistPerFigure),1) = cellstr(['dist* = ',num2str(distStar)]); else legende(nDistPerFigure,1) = cellstr(['dist* = ',num2str(distStar)]); end uStar = table_D(:,2); absStar = table_D(:,absChoice); plot(absStar,uStar,'Color',colors(rem(i,nDistPerFigure)+1,:)); lastLineRead = lastLineRead+1 + nbreValSuc_D; if (rem(i,nDistPerFigure)==0 || i==nbreTableau) legend(legende) if nbreTableau - i >= nDistPerFigure legende = cell(nDistPerFigure,1); else legende = cell(nbreTableau - i,1); end end end disp(['Final line read = ',num2str(lastLineRead)]) end