Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
cody2 authored Apr 17, 2019
1 parent 766205f commit 94f57d8
Showing 1 changed file with 24 additions and 29 deletions.
53 changes: 24 additions & 29 deletions plotter_model_4.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%%
% /--------------------------------------------------------------\
% | Date: 04/14/2019 |
% | Date: 04/17/2019 |
% | Author: Jonathan Cody |
% | Affiliation: Purdue University |
% | Weldon School of Biomedical Engineering |
Expand All @@ -23,7 +23,7 @@
xunits = 'Weeks Post-Treatment' ;% x-axis labels
Yunits = D.Yu ;% y-axis labels for main outputs

suffix = 'test' ;% suffix for output filenames
suffix = 'test' ;% suffix for output filenames
ext = 'jpg' ;% file extension for figure files

extra = 1 ;% 1 = plot extended outputs
Expand All @@ -41,30 +41,19 @@
% calibrator.m Parameter Inputs
% ------------------------------------------------------------------------

PlotRanks = 1 ;% run(s) in data file to plot (as ranked in C)
PlotRanks = 1:6 ;% run(s) in data file to plot (as ranked in C)
tend = 420 ;% ending time point for plotting results

COLORS = {[1 0 0]*0.8,[1 1 0]*0.8,[0 1 0]*0.8,...
[0 1 1]*0.8,[0 0 1]*0.8,[1 0 1]*0.8,};

% I use this line to plot the best run on top
% PlotRanks = flip(PlotRanks) ;
% COLORS = flip(COLORS) ;

% I use this line when plotting pairs of parameter sets from calibrator.m
% COLORS = {COLORS{PlotRanks(1)},COLORS{PlotRanks(2)}} ;

%% ------------------------------------------------------------------------
% Manual Parameter Inputs (arbitrary)
% ------------------------------------------------------------------------

% monkey = 2 ;% monkey
% for n = 1:4
% X{n} = D.X_ellis3{n}(monkey) ; %#ok<*SAGROW>
% Y{n} = D.Y_ellis3{n}(monkey) ;
% IC(n,1) = mean(Y{n}{1}(1:5)) ;
% end

for n = 1:4
IC(n) = mean([D.Y_ellis3{n}{1}(1:5)...
;D.Y_ellis3{n}{2}(1:5)...
Expand All @@ -87,9 +76,9 @@
P = zeros(42,4) ;

% Fixed Parameters
P([01:03 34],:) = [4 500 200 1000]'.*[1 1 1 1] ;% V, E, K, T i.c.
P([01:03 34],:) = IC'.*[1 1 1 1] ;% V, E, K, T i.c.
P(04,:) = [1 1 1 1] * 877 ;% Q i.c. [pmol/kg]
P(05,:) = [1 1 1 1] * 0.75 ;% C absorption rate const. [/d]
P(05,:) = [1 1 1 1] * 0.75 ;% C absorption rate const. [/d]
P(06,:) = [1 1 1 1] * 0.75/1.64 ;% P(05) * 'bioavail.'/'voldist.' [kg/L-d]
P(07,:) = [1 1 1 1] * 2.1 ;% C elimination rate const. [/d]
P(24,:) = [1 1 1 1] * 5 ;% # of TOL delay chambers []
Expand All @@ -108,22 +97,22 @@
P(14,:) = [10 10 10 10] ;% drug killing modifier []
P(15,:) = [10 10 10 10] ;

P(16,:) = [5 5 5 5] ;% drug half saturation [pM]
P(17,:) = [5 5 5 5] ;
P(16,:) = [0.2 0.2 20 20] ;% drug half saturation [pM]
P(17,:) = [0.2 0.2 20 20] ;
P(18,:) = [1 1 1 1] ;% drug max prolif rate [/d]
P(19,:) = [1 1 1 1] ;

P(20,:) = [0.2 0.2 0.2 0.2] ;% TOL delay rate constant [/d]
P(21,:) = [0.2 0.2 0.2 0.2] ;
P(22,:) = [0.2 0.2 0.2 0.2] ;% REG delay rate constant [/d]
P(23,:) = [0.2 0.2 0.2 0.2] ;
P(20,:) = [0.1 1 0.1 1] ;% TOL delay rate constant [/d]
P(21,:) = [0.1 1 0.1 1]*0 ;
P(22,:) = [0.5 2 0.5 2]*0 ;% REG delay rate constant [/d]
P(23,:) = [0.5 2 0.5 2] ;

P(28,:) = [2 2 2 2] ;% tolerance modifier []
P(29,:) = [2 2 2 2] ;
P(30,:) = [0.1 0.1 0.1 0.1] ;% regulation-induced decay [*P(18)]
P(31,:) = [0.1 0.1 0.1 0.1] ;% [*P(19)]
P(32,:) = [100 100 100 100] ;% regulation killing modifier []
P(33,:) = [0 0 0 0] ;%
P(28,:) = [2 2 2 2]*0 ;% tolerance modifier []
P(29,:) = [2 2 2 2]*0 ;
P(30,:) = [0.1 0.1 0.1 0.1]*0 ;% regulation-induced decay [*P(18)]
P(31,:) = [0.1 0.1 0.1 0.1]*0 ;% [*P(19)]
P(32,:) = [100 100 100 100]*0 ;% regulation killing modifier []
P(33,:) = [0 0 0 0]*0 ;%

% T Parameters
P(35,:) = [1 1 1 1]*0 ;% T death rate constant [/d]
Expand All @@ -142,6 +131,7 @@
ParMatrix = P ;
RowLabels = {'red';'yellow';'green';'cyan';'blue';'magenta'} ;


%% ========================================================================
% BODY
% ========================================================================
Expand All @@ -150,6 +140,11 @@
% Setup
% ------------------------------------------------------------------------

% Flip so best fit plots on top
PlotRanks = flip(PlotRanks) ;
COLORS = flip(COLORS) ;
RowLabels = flip(RowLabels) ;

% If calibrator output file parameters are used...
if manualpars == 0

Expand Down Expand Up @@ -195,7 +190,7 @@
name = [name ' rank ' num2str(PlotRanks)];
end
F = figure('Name',name,'Color',[1 1 1]) ;
for n = 1:4
for n = 1:3
axes('Units','normalized','Position',...
[margs(3) ypos 1-sum(margs(3:4)) axheight])
ypos = ypos - axheight - gap ;
Expand Down

0 comments on commit 94f57d8

Please sign in to comment.