% DoOnceThrough executes one curvf fit iteration of the DoMuMatchFitLSQRd % routine and generates figures, %Initialization tic delete fig*.fig close all; clear all; %Set the biconcave shape template, enter material constants and cell dimensions: INPUTS = make_INPUTS_FitMud; % INPUTS{1} is the AREA _TEMPLATE % INPUTS{2} is PROPS % INPUTS{3} is dims % INPUTS{4} is INDEX (# of points in different cell regions) % INPUTS{5} is rstart % INPUTS{6} is lam0 dims = INPUTS{3}; Lp = dims{1}; Rp = dims{3}; nvals = size(Lp); PROPS = INPUTS{2}; bblackx,bblackx=1000*[0.00752 0.0094 0.01127 0.01315 0.01477 0.01718 0.0188 0.02041 0.02229 0.0247 0.02578 0.02819 0.02926 0.03194 0.03329 0.03544 0.03759]; bblacky=[1.34949 1.44983 1.67904 1.73704 1.82264 1.79411 1.95152 1.99478 2.23872 2.26726 2.26726 2.35379 2.39705 2.49739 2.54066 2.61246 2.6548]; bwhitex=1000*[0.00375 0.00752 0.01155 0.0153 0.0188 0.02229 0.02713 0.03034 0.03275]; bwhitey=[1.39184 1.59343 1.85118 1.92298 2.16692 2.31052 2.39705 2.45413 2.46886]; % The cell data to be fit are loaded in Make inputs via a call to load cell % data. The following could be used for plotting, but for now are commented % out to avoid confusion. There are three different experimental days. % These are data points from 6/18, 6/19 and 6/20/90, corrected data (See MUTEST.xls) % For 620, Dp = 1.7 um; For 6/19 and 6/18, Dp = 1.1 um % PRpdata620 = [10.3618 12.4342 14.5065 16.5789 20.7236 24.8684 20.7236 16.5789 14.5065 12.4342 10.3618 8.2895 6.2171]; % LoRpdata620 = [1.2742 1.3762 1.4911 1.5989 1.7500 1.9875 1.8435 1.6672 1.6036 1.4543 1.2899 1.1992 0.9612]; % LoRpErr620 = [0.2405 0.2087 0.2001 0.1843 0.1693 0.1699 0.1479 0.1577 0.0586 0.1501 0.1197 0.1343 0.1211]; PRpdata620 = [10.3618 12.4342 14.5065 16.5789 20.7236 24.8684 ]; LoRpdata620 = [1.2742 1.3762 1.4911 1.5989 1.7500 1.9875 ]; LoRpErr620 = [0.2405 0.2087 0.2001 0.1843 0.1693 0.1699 ]; % For 6/19, Dp = 1.13 um % clo % PRpdata619 = [13.734 16.4808 19.2276 21.9744 27.468 21.9744 16.4808 10.9872 8.2404]; % LoRpdata619 = [1.22679 1.42679 1.55536 1.68929 1.90357 1.72143 1.52321 1.19107 0.97024]; % LoRpErr619 = [0.06469 0.08685 0.10762 0.113 0.11269 0.135 0.14037 0.1243 0.1171]; PRpdata619 = [13.734 16.4808 19.2276 21.9744 27.468 ]; LoRpdata619 = [1.22679 1.42679 1.55536 1.68929 1.90357 ]; LoRpErr619 = [0.06469 0.08685 0.10762 0.113 0.11269 ]; % % % For 6/18, Dp = 1.12 um % % PRpdata618 = [8.31397 11.0853 13.85662 16.6280 19.3993 22.1706 27.7133 22.1706 16.6280 11.0853]; % LoRpdata618 = [1.16056 1.32491 1.49178 1.6182 1.75727 1.9115 2.03894 1.86549 1.66119 1.33755]; % LoRpErr618 = [0.11911 0.1365 0.11593 0.13279 0.10204 0.07782 0.12415 0.08072 0.09389 0.16409]; PRpdata618 = [8.31397 11.0853 13.85662 16.6280 19.3993 22.1706 27.7133 ]; LoRpdata618 = [1.16056 1.32491 1.49178 1.6182 1.75727 1.9115 2.03894 ]; LoRpErr618 = [0.11911 0.1365 0.11593 0.13279 0.10204 0.07782 0.12415 ]; errorbar(PRpdata618,LoRpdata618,LoRpErr618,'bs','MarkerSize',14,'linewidth',4); %varparam = [bovers0, sigap]; LoRp = Lp./Rp; %Set values for bovers0, sigap: varparams1 = [30.82, 3.39, 140]; [sumsqerr, PxRp_th1] = SumSqrErr_plots(LoRp,varparams1,INPUTS); sumsqerr varparams2 = [16.26, 7.07, 160]; [sumsqerr, PxRp_th2] = SumSqrErr_plots(LoRp,varparams2,INPUTS); sumsqerr varparams3 = [8.45, 11.14, 200]; [sumsqerr, PxRp_th3] = SumSqrErr_plots(LoRp,varparams3,INPUTS); sumsqerr %% figure(52); errorbar(PRpdata618,LoRpdata618,LoRpErr618,'bs','MarkerSize',14,'linewidth',4); %errorbar(PRpdata619,LoRpdata619,LoRpErr619,'bs','MarkerSize',14,'linewidth',4); %errorbar(PRpdata620,LoRpdata620,LoRpErr620,'bs','MarkerSize',14,'linewidth',4); hold on; x = PxRp_th1; y = LoRp; rho = PROPS{6}; plot(PxRp_th1,LoRp,'k',PxRp_th2,LoRp,'r',PxRp_th3,LoRp,'c','LineWidth',4.0); y2=(x-x(1)).*(y(2)-y(1))/(x(2)-x(1))+y(1); plot(x,y2,'k-.','LineWidth',4.0); % errorbar(PRpdata620,LoRpdata620,LoRpErr620,'rs', ... % 'MarkerEdgeColor',[.5,1,.5], ... % 'MarkerFaceColor',[.5,1,.5]); % errorbar(PRpdata619,LoRpdata619,LoRpErr619,'bs') % plot set set(gca,'FontSize',36) %set labels %ylabel('L_p/R_p','FontSize',36) % x-axis label %xlabel('\DeltaP R_p (pN/\mum)','FontSize',36) % y-axis label ylabel('{\boldmath $L_p/R_p$}','FontSize',40,'Interpreter','latex') % x-axis label xlabel('{\boldmath $\Delta P R_p (pN/\mu m)$}','FontSize',40,'Interpreter','latex') % y-axis label ll=[20 30 40 50 60 70 80 90 97]; f=[1 17 30 38 19 17 6 1 1]; ff=ll.^2.*f; wl=f/sum(f); w=ff/sum(ff); b=varparams1(1); sigap = varparams1(2); Lmax =varparams1(3); mu3a=0; for i=1:9 k = 1.38e-23; th = 300.0; P=b*1e-9; Lc=Lmax*1e-9; x0=ll(i)/Lmax; mu=(sqrt(3).*k.*th)./(4.*P.*Lc.*x0).*(0.75./((1-x0).^2)+4.*x0-0.75+x0./(2*(1-x0).^2))*10^6; mu3a=mu3a+mu*w(i); end b=varparams2(1); sigap = varparams2(2); Lmax =varparams2(3); mu3b=0; for i=1:9 k = 1.38e-23; th = 300.0; P=b*1e-9; Lc=Lmax*1e-9; x0=ll(i)/Lmax; mu=(sqrt(3).*k.*th)./(4.*P.*Lc.*x0).*(0.75./((1-x0).^2)+4.*x0-0.75+x0./(2*(1-x0).^2))*10^6; mu3b=mu3b+mu*w(i); end b=varparams3(1); sigap = varparams3(2); Lmax =varparams3(3); mu3c=0; for i=1:9 k = 1.38e-23; th = 300.0; P=b*1e-9; Lc=Lmax*1e-9; x0=ll(i)/Lmax; mu=(sqrt(3).*k.*th)./(4.*P.*Lc.*x0).*(0.75./((1-x0).^2)+4.*x0-0.75+x0./(2*(1-x0).^2))*10^6; mu3c=mu3c+mu*w(i); end lgnd=legend({['Experiment 1, R_{p}=0.56 \mum'], ... ['Model fit 1, \mu_0=', num2str(mu3a, '%1.2f'),' pN/\mum, s_0=[20 ... 97] nm,',char(10),'s_{max}=',num2str(varparams1(3),'%1.2f'),' nm, p=',num2str(varparams1(1),'%1.2f'),' nm, \sigma_{ap}=',num2str(varparams1(2),'%1.2f'), ' pN/\mum'], ... ['Model fit 2, \mu_0=', num2str(mu3b, '%1.2f'),' pN/\mum, s_0=[20 ... 97] nm,',char(10),'s_{max}=',num2str(varparams2(3),'%1.2f'),' nm, p=',num2str(varparams2(1),'%1.2f'),' nm, \sigma_{ap}=',num2str(varparams2(2),'%1.2f'), ' pN/\mum'], ... ['Model fit 3, \mu_0=', num2str(mu3c, '%1.2f'),' pN/\mum, s_0=[20 ... 97] nm,',char(10),'s_{max}=',num2str(varparams3(3),'%1.2f'),' nm, p=',num2str(varparams3(1),'%1.2f'),' nm, \sigma_{ap}=',num2str(varparams3(2),'%1.2f'), ' pN/\mum'],['Constant shear modulus \mu=', num2str(mu3a, '%1.2f'),' pN/\mum'], ... }); %lgnd=legend({['Experiment, R_{p}=0.56 \mum'], ... %['Model, \mu_0=', num2str(mu3, '%1.2f'),' pN/\mum, s_0=[20 ... 97] nm,',char(10),'s_{max}=',num2str(Lmax,'%1.2f'),' nm, p=',num2str(varparams(1),'%1.2f'),' nm, \sigma_{ap}=',num2str(sigap,'%1.2f'), ' pN/\mum'],['Constant shear modulus \mu=', num2str(mu3, '%1.2f'),' pN/\mum']}); %lgnd=legend({['June 18, 1990, R_{p}=0.56\mum'], ... % lgnd=legend({['June 18, 1990, R_{p}=0.56\mum, \sigma_{ap}= ',num2str(sigma_ap, '%1.2f')], ... % ['Model \mu_0=', num2str(mu1, '%1.2f'),'pN/\mum, l_0=',num2str(xa3(1),'%1.2f'),'nm',', L_{c}=',num2str(xa3(2),'%1.2f'),'nm, p=',num2str(xa3(3),'%1.2f'),'nm, \alpha=0'], ... % ['Model \mu_0=',num2str(mu2,'%1.2f'),'pN/\mum, l_0=',num2str(xa4(1),'%1.2f'),'nm',', L_{c}=',num2str(xa4(2),'%1.2f'),'nm, p=',num2str(xa4(3),'%1.2f'),'nm']}); xlim([5 35]) ylim([1 2.5]) set(lgnd,'FontSize',24); set(lgnd,'FontName','Arial','Location','southeast'); spreadfigures; toc