From 1c3a366ed04f78d8c7583c575d5acc59445ac568 Mon Sep 17 00:00:00 2001 From: "Cody, Jonathan William" Date: Sun, 25 Dec 2022 09:00:18 -0600 Subject: [PATCH] Delete HIV_plotter.m --- Legacy Code/HIV_plotter.m | 84 --------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 Legacy Code/HIV_plotter.m diff --git a/Legacy Code/HIV_plotter.m b/Legacy Code/HIV_plotter.m deleted file mode 100644 index 0227158..0000000 --- a/Legacy Code/HIV_plotter.m +++ /dev/null @@ -1,84 +0,0 @@ -% -% /-------------------------------------------------------\ -% | Date: 5/25/2018 | -% | Author: Jonathan Cody | -% | Institution: Purdue University | -% | Weldon School of Biomedical Engineering | -% | Pienaar Lab | -% \-------------------------------------------------------/ -% -% Plots full model outputs of select 'calibrator.m' parameter sets. -% -% NOTE: Lines flagged are data specific. Comment out for general use! -% -% INPUTS ================================================================== -% -% suf = suffix for C file containing results of 'calibrator' -% (should be same 'suf' used in 'calibrator') -% Ns = parameter sets to plot -% (i.e. Ns = 1:5 to plot top 5) -% ext = save file extension for figures -% (i.e. 'fig','jpg', etc. - -% OUTPUTS ================================================================= -% -% Plots each model variable with rate terms of ODE in log scale. -% -% CALCULATIONS ============================================================ - -function HIV_plotter(suf,Ns,ext) - -warning('off') -C = load(['C' suf]) ;% output data structure -D = C.D ;% calibration data structure -S = size(D,2) ;% number of species -warning('on') - -for n = 1:S - ts(n) = D(n).t(1) ;% start time for each species - te(n) = D(n).t(end) ;% end time for each species -end -tt = min(ts):1:max(te) ;% time points to evaluate model -td = D(1).td ;% time points for doses - -line = {'-','--','-.',':','--','-.',':'} ; - -for n = Ns - [~,Ya,~] = C.mod(tt,td,C.P(n,:)) ;% model solution - i = 0 ;% index - j = 0 ;% index - for m = 1:length(Ya) - j = j + 1 ; - if j == 1 - i = i + 1 ; - name = ['Fullplot' suf '_set' num2str(n) '_' num2str(i)]; - F = figure('Name',name,'Color',[1 1 1]) ; - end - subplot(3,1,j) - hold on - for o = 1:size(Ya{m},1) - plot(tt,log10(abs(Ya{m}{o,2})),... - 'LineStyle',line{o},'LineWidth',2) - leg{o} = [Ya{m}{o,1} ' [log(' Ya{m}{o,3} ')]'] ; - if any(log10(Ya{m}{o,2})<-10) - ylow = -10 ; - else - ylow = -inf ; - end - end - ylabel('Log scale') - xlabel(D(1).tu) - axis([tt(1) tt(end) ylow inf]) - legend(leg,'Location','eastoutside') - set(gca,'FontSize',12,'FontName','Arial','LineWidth',1.5) - set(gca,'XTickLabel',tt(1):14:tt(end),'XTick',tt(1):14:tt(end),'XTickLabelRotation',45) % - grid on - if j == 3 - j = 0 ; - saveas(F,name,ext) - end - end - saveas(F,name,ext) -end -disp('Done!') -end %#ok<*AGROW>