46 this =
this@models.pcd.BasePCDSystem(model);
49 this.
f= models.pcd.CoreFun3D(
this);
58 this.
addParam(
" area_front ", .5,
" Range ", [.3, .8],
" Desired ", 3);
59 this.
addParam(
" area_back ", 0,
" Range ", [0, 0],
" Desired ", 2);
60 this.
addParam(
" area_left ", .5,
" Range ", [.3, .8],
" Desired ", 3);
61 this.
addParam(
" area_right ", 0,
" Range ", [0, 0],
" Desired ", 2);
62 this.
addParam(
" area_top ", .5,
" Range ", [.3, .8],
" Desired ", 2);
63 this.
addParam(
" area_bottom ", 0,
" Range ", [0, 0],
" Desired ", 2);
65 this.
addParam(
" rate_front ", rate_max/2,
" Range ", [0, rate_max],
" Desired ", 4);
66 this.
addParam(
" rate_back ", rate_max/2,
" Range ", [0, rate_max],
" Desired ", 1);
67 this.
addParam(
" rate_left ", rate_max/2,
" Range ", [0, rate_max],
" Desired ", 4);
68 this.
addParam(
" rate_right ", rate_max/2,
" Range ", [0, rate_max],
" Desired ", 1);
69 this.
addParam(
" rate_top ", rate_max/2,
" Range ", [0, rate_max],
" Desired ", 4);
70 this.
addParam(
" rate_bottom ", rate_max/2,
" Range ", [0, rate_max],
" Desired ", 1);
84 b = [min(xa(:)) max(xa(:)); min(ya(:)) max(ya(:));...
85 min(xi(:)) max(xi(:)); min(yi(:)) max(yi(:))];
87 f1 = figure(1); rotate3d on;
88 f2 = figure(2); rotate3d on;
89 hlpf = figure(
" Visible ",
" off ",
" MenuBar ",
" none ",
" ToolBar ",
" none ");
90 hlpax = newplot(hlpf);
92 caps = [
" Caspase-8 ",
" Caspase-3 ",
" Pro-Caspase-8 ",
" Pro-Caspase-3 "];
97 set(a,
" Box ",
" on ",
" GridLineStyle ",
" none ");
99 set(a,
" CLimMode ",
" manual ",
" CLim ",b(p,:));
104 xlabel(a,
" Left to right ");
105 ylabel(a,
" Top to bottom ");
106 zlabel(a,
" Front to back ");
107 title(a,sprintf(
" Model '%s', %s concentrations ", model.
Name, caps[p]));
108 colorbar(
" peer ",a);
114 set(a,
" Box ",
" on ",
" GridLineStyle ",
" none ");
116 set(a,
" CLimMode ",
" manual ",
" CLim ",b(p,:));
121 xlabel(a,
" Left to right ");
122 ylabel(a,
" Top to bottom ");
123 zlabel(a,
" Front to back ");
124 title(a,sprintf(
" Model '%s', %s concentrations ", model.
Name, caps[p]));
125 colorbar(
" peer ",a);
132 x = a(1,1):this.
h:a(1,2);
133 y = a(2,1):this.
h:a(2,2);
134 z = a(3,1):this.
h:a(3,2);
135 [
X,
Y,Z] = meshgrid(x,y,z);
136 xpos = mean(x); ypos = mean(y); zpos = mean(z);
138 step = round(length(t)/40);
139 for idx=1:step:length(t)
140 h1 = doplot(xa(:,idx),ax(1:2));
141 h2 = doplot(ya(:,idx),ax(3:4));
142 h3 = doplot(xi(:,idx),ax(5:6));
143 h4 = doplot(yi(:,idx),ax(7:8));
144 set(f1,
" Name ",sprintf(
" Plot at t=%f ",
t(idx)));
145 set(f2,
" Name ",sprintf(
" Plot at t=%f ",
t(idx)));
148 delete([h1; h2; h3; h4]);
154 function h = doplot(zd, ax)
158 hc = contourslice(ax(1),
X,Y,Z,V,[],0:.2:1,[]);
163 if V(1) ~= 0 &&
all(V(1) == V(:))
166 hs = slice(hlpax,
X,Y,Z,V,xpos,ypos,zpos);
167 set(hs,
" Parent ",ax(2),
" FaceColor ",
" interp ",
" EdgeColor ",
" none ");
169 hs2 = slice(hlpax,
X,Y,Z,V,a(1,2),a(2,1),a(3,1));
170 set(hs2,
" Parent ",ax(2),
" FaceColor ",
" interp ",
" EdgeColor ",
" none ");
195 x0(2*m+1:end) = 1e-9;
196 this.
x0= dscomponents.ConstInitialValue(
x0);
199 ge = general.geometry.RectGrid3D(d(1),d(2),d(3));
203 A = blkdiag(
A,D(1)*
A,D(2)*
A,D(3)*
A);
214 d1idx = find(abs((1:d) - d/2) <= d/2 * p);
216 d2idx = find(abs((1:d) - d/2) <= d/2 * p);
218 d3idx = find(abs((1:d) - d/2) <= d/2 * p);
219 [d1,d2,d3] = meshgrid(d1idx,d2idx,d3idx);
223 C(ca3(sel)) = 1/length(sel);
char Name
The name of the Model.
PCDSYSTEM3D 3D implementation of the cell apoptosis model.
h
Spatial stepwidth (in unscaled size units!) is set in subclasses.
PCDSystem3D(models.BaseFullModel model)
The base class for any KerMor detailed model.
Model
The Model this System is attached to.
hs
scaled spatial stepwidth
Dims
The system's dimensions.
reshape
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape ...
LinearCoreFun(A)
No system reference needed for constant linear core fun.
dscomponents.AInitialValue x0
Function handle to initial state evaluation.
dscomponents.LinearOutputConv C
The output conversion Defaults to an LinearOutputConv instance using a 1-matrix, which just forwards ...
dscomponents.ACoreFun f
The core f function from the dynamical system.
MatUtils: Matrix utility functions.
function plotState(models.BaseFullModel model,rowvec t,matrix v)
Performs a plot for this model's results.
Omega
The spatial width/area/region (in unscaled size units!)
function ModelParam p = addParam(char name, default, varargin)
Adds a parameter with the given values to the parameter collection of the current dynamical system...
PCDSYSTEM The 2D dynamical system of the Programmed Cell Death Model by Markus Daub.
dscomponents.LinearCoreFun A
Represents a linear or affine-linear component of the dynamical system.
function newSysDimension()
Custom updates for new system dimension.
Diff
Relative diffusion coefficients ([d2/d1, d3/d1, d4/d1])
static function A = laplacemat3D(h, g)
Computes a 3D laplacian sparse matrix.