%This script file checks to see what graphs the user wants and then subplots the graphs %accordingly so that the space on the screen is maximized for efficiency if (strcmp(get(gxlin,'Checked'),'on') | strcmp(get(gylin,'Checked'),'on') | strcmp(get(grlin,'Checked'),'on')) & (strcmp(get(gxlog,'Checked'),'on') | strcmp(get(gylog,'Checked'),'on') | strcmp(get(grlog,'Checked'),'on')) subplot(2,1,1); if strcmp(get(gxlin,'Checked'),'on'), plot(tau,X,'b'), hold on; if strcmp(get(greg,'Checked'),'on'), plot(tau1Xplot,linex1,'c',tau2Xplot,linex2,'c'),hold on; plot(fitTimeX,X(fitTimeX/.01),'b*',critpointX*.01,X(critpointX),'cx'), hold on; end end if strcmp(get(gylin,'Checked'),'on'), plot(tau, Y, 'y'), hold on; if strcmp(get(greg,'Checked'),'on'), plot(tau1Yplot,liney1,'g',tau2Yplot,liney2,'g'), hold on; plot(fitTimeY,Y(fitTimeY/.01),'yo',critpointY*.01,Y(critpointY),'gx'), hold on; end end if strcmp(get(grlin,'Checked'),'on'), plot(tau, R, 'r'), hold on; if strcmp(get(greg,'Checked'),'on'), plot(tau1Rplot,liner1,'m',tau2Rplot,liner2,'m'), hold on; plot(fitTimeR,R(fitTimeR/.01),'r*',critpointR*.01,R(critpointR),'mx'), hold on; end end title('Linear Stabilogram-Diffusion plot') text(8.5,10,'X','color','b'); text(9,10,'Y','color','y'); text(9.5,10,'R','color','r'); axis([0 10 0 max(R)+10]); %Plot loglog graphs subplot(2,1,2); if strcmp(get(gxlog,'Checked'),'on'), loglog(tau,X,'b'),hold on; if strcmp(get(greg,'Checked'),'on'), loglog(tau1Xplot,linex1log,'c',tau2Xplot,linex2log,'c'),hold on; loglog(fitTimeX,X(fitTimeX/.01),'b*',critpointX*.01,X(critpointX),'cx'), hold on; end end if strcmp(get(gylog,'Checked'),'on'), loglog(tau, Y, 'y'), hold on; if strcmp(get(greg,'Checked'),'on'), loglog(tau1Yplot,liney1log,'g',tau2Yplot,liney2log,'g'),hold on; loglog(fitTimeY,Y(fitTimeY/.01),'yo',critpointY*.01,Y(critpointY),'gx'), hold on; end end if strcmp(get(grlog,'Checked'),'on'), loglog(tau, R, 'r'), hold on; if strcmp(get(greg,'Checked'),'on'), loglog(tau1Rplot,liner1log,'m',tau2Rplot,liner2log,'m'), hold on; loglog(fitTimeR,R(fitTimeR/.01),'r*',critpointR*.01,R(critpointR),'mx'), hold on; end end axis([.01 10 .1 150]); xlabel('time interval (s)'); zoom on title('Log-log Stabilogram-Diffusion plot') text(3,.2,'X','color','b'); text(5,.2,'Y','color','y'); text(7,.2,'R','color','r'); elseif (strcmp(get(gxlin,'Checked'),'on') | strcmp(get(gylin,'Checked'),'on') | strcmp(get(grlin,'Checked'),'on')) | (strcmp(get(gxlog,'Checked'),'on') | strcmp(get(gylog,'Checked'),'on') | strcmp(get(grlog,'Checked'),'on')) if strcmp(get(gxlin,'Checked'),'on'), title('Linear Stabilogram-Diffusion plot') text(8.5,5,'X','color','b'); text(9,5,'Y','color','y'); text(9.5,5,'R','color','r'); plot(tau,X,'b'), hold on; if strcmp(get(greg,'Checked'),'on'), plot(tau1Xplot,linex1,'c',tau2Xplot,linex2,'c'),hold on; plot(fitTimeX,X(fitTimeX/.01),'b*',critpointX*.01,X(critpointX),'cx'), hold on; end end if strcmp(get(gylin,'Checked'),'on'), title('Linear Stabilogram-Diffusion plot') text(8.5,5,'X','color','b'); text(9,5,'Y','color','y'); text(9.5,5,'R','color','r'); plot(tau, Y, 'y'), hold on; if strcmp(get(greg,'Checked'),'on'), plot(tau1Yplot,liney1,'g',tau2Yplot,liney2,'g'), hold on; plot(fitTimeY,Y(fitTimeY/.01),'yo',critpointY*.01,Y(critpointY),'gx'),hold on; end end if strcmp(get(grlin,'Checked'),'on'), title('Linear Stabilogram-Diffusion plot') text(8.5,5,'X','color','b'); text(9,5,'Y','color','y'); text(9.5,5,'R','color','r'); plot(tau, R, 'r'), hold on; if strcmp(get(greg,'Checked'),'on'), plot(tau1Rplot,liner1,'m',tau2Rplot,liner2,'m'), hold on; plot(fitTimeR,R(fitTimeR/.01),'r*',critpointR*.01,R(critpointR),'mx'), hold on; end end %Plot loglog graphs if strcmp(get(gxlog,'Checked'),'on'), title('Log-log Stabilogram-Diffusion plot') axis([.01 10 .1 150]); text(3,.2,'X','color','b'); text(5,.2,'Y','color','y'); text(7,.2,'R','color','r'); loglog(tau,X,'b'),hold on; if strcmp(get(greg,'Checked'),'on'), loglog(tau1Xplot,linex1log,'c',tau2Xplot,linex2log,'c'),hold on; loglog(fitTimeX,X(fitTimeX/.01),'b*',critpointX*.01,X(critpointX),'cx'), hold on; end end if strcmp(get(gylog,'Checked'),'on'), title('Log-log Stabilogram-Diffusion plot') axis([.01 10 .1 150]); text(3,.2,'X','color','b'); text(5,.2,'Y','color','y'); text(7,.2,'R','color','r'); loglog(tau, Y, 'y'), hold on; if strcmp(get(greg,'Checked'),'on'), loglog(tau1Yplot,liney1log,'g',tau2Yplot,liney2log,'g'),hold on; loglog(fitTimeY,Y(fitTimeY/.01),'yo',critpointY*.01,Y(critpointY),'gx'), hold on; end end if strcmp(get(grlog,'Checked'),'on'), title('Log-log Stabilogram-Diffusion plot') axis([.01 10 .1 150]); text(3,.2,'X','color','b'); text(5,.2,'Y','color','y'); text(7,.2,'R','color','r'); loglog(tau, R, 'r'), hold on; if strcmp(get(greg,'Checked'),'on'), loglog(tau1Rplot,liner1log,'m',tau2Rplot,liner2log,'m'), hold on; loglog(fitTimeR,R(fitTimeR/.01),'r*',critpointR*.01,R(critpointR),'mx'), hold on; end end zoom on xlabel('time interval (s)'); end