Biomedical Engineering Reference
In-Depth Information
¼
Vv0
150; % Initial (end-diastolic) ventricular volume
%
% Compute intermediate term denom
% to simplify computations:
%
¼
^
^
denom
((1.-exp(-(tp/tc)
alpha))*exp(-((tp-tb)/tr)
alpha));
%
% Compute for initial time t
¼
0 (MATLAB does not allow 0 index)
%
t(1)
¼
0.;
Vv(1)
¼
Vv0;
¼
^
edp
a*((Vv0 -b))
2;
¼
pdp
c*Vv0 - d;
¼
pp
pdp/denom;
¼
t1
0.; % Time step for first exponential
¼
t2
0.; % Time step for second exponential
¼
^
e1
exp(-(t1/tc)
alpha);
¼
^
e2
exp(-(t2/tr)
alpha);
¼
þ
pv0
edp
pp*((1.-e1)*e2);
%
% Main computation loop:
%
¼
for j
2:1000
¼
þ
t(j)
t(j-1)
delt;
¼
Vv(j)
Vv(j-1);
%
¼
^
edp
a*((Vv(j) -b))
2;
pdp
¼
c*Vv(j) - d;
pp
¼
pdp/denom;
t(j);
% Second exponential begins at t
t1
¼
>
tb
t2
t(j) - tb;
if (t2
¼
<
0.) ;
¼
t2
0.;
end
e1
¼
^
exp(-(t1/tc)
alpha);
¼
^
e2
exp(-(t2/tr)
alpha);
¼
þ
pv(j)
edp
pp*((1.-e1)*e2);
end
%
plot(t,pv)
grid on
title('Isovolumic Ventricular Pressure')
xlabel('Time [s]')
ylabel('Ventricular Pressure Pv [mmHg]')
Search WWH ::




Custom Search