Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tsinghua
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zhefu Li
Tsinghua
Commits
04509012
Commit
04509012
authored
6 months ago
by
Zhefu Li
Browse files
Options
Downloads
Patches
Plain Diff
Update model.html
parent
adb4818d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wiki/pages/model.html
+78
-1
78 additions, 1 deletion
wiki/pages/model.html
with
78 additions
and
1 deletion
wiki/pages/model.html
+
78
−
1
View file @
04509012
...
...
@@ -304,7 +304,7 @@
muskone in the intestine can be obtained in combination with experimental determination. Because
there is no animal experimental support, the data are manually drafted, and the calculation method
is more meaningful than the calculation results.
</p>
<button
onclick=
"toggleCodeSnippet()"
>
Expand the code
</button>
<button
id=
"Button1"
onclick=
"toggleCodeSnippet()"
>
Expand the code
</button>
<div
id=
"codeSnippet"
class=
"code-snippet"
>
```metlab
...
...
@@ -318,8 +318,85 @@
k_dist = 0.001;
k_excrete = 0.05;
k_move = 0.02;
% Define the time range
tspan = [0 300]; % From 0 to 5 minutes
initial_conditions = [0 0 0 0 0]; % The initial condition is 0
% solve ODE
[t, y] = ode45(@(t,y) odefun(t, y, Q_inhale, k_exhale, k_perm, k_adh, k_diffMC, k_diffLC, k_dist,
k_excrete, k_move), tspan, initial_conditions);
% calculate V_inhale
V_inhale = Q_inhale / 5 * (heaviside(t) - heaviside(t-5));
figure('Position', [100, 100, 1200, 1000]);
% V_inhale(t)
subplot(3,2,1)
plot(t, V_inhale)
title('V_{inhale}(t)')
xlabel('Time (s)')
ylabel('V_{inhale}')
% Q_A(t)
subplot(3,2,2)
plot(t, y(:,1))
title('Q_A(t)')
xlabel('Time (s)')
ylabel('Q_A')
% Q_L(t)
subplot(3,2,3)
plot(t, y(:,2))
title('Q_L(t)')
xlabel('Time (s)')
ylabel('Q_L')
% Q_M(t)
subplot(3,2,4)
plot(t, y(:,3))
title('Q_M(t)')
xlabel('Time (s)')
ylabel('Q_M')
% Q_C(t)
subplot(3,2,5)
plot(t, y(:,4))
title('Q_C(t)')
xlabel('Time (s)')
ylabel('Q_C')
% Q_I(t)
subplot(3,2,6)
plot(t, y(:,5))
title('Q_I(t)')
xlabel('Time (s)')
ylabel('Q_I')
sgtitle('Simulation Results')
% ODE
function dydt = odefun(t, y, Q_inhale, k_exhale, k_perm, k_adh, k_diffMC, k_diffLC, k_dist,
k_excrete, k_move)
V_inhale = Q_inhale / 5 * (heaviside(t) - heaviside(t-5));
dydt = zeros(5,1);
dydt(1) = V_inhale - (k_exhale + k_perm) * y(1); % dQ_A/dt
```
</div>
<script>
function
toggleCodeSnippet
()
{
var
codeSnippet
=
document
.
getElementById
(
"
codeSnippet
"
);
var
button
=
document
.
getElementById
(
"
Button1
"
);
// 注意变量名通常使用小写开头
if
(
codeSnippet
.
style
.
display
===
"
none
"
)
{
codeSnippet
.
style
.
display
=
"
block
"
;
button
.
textContent
=
"
Collapse the code
"
;
// 使用之前选中的按钮元素
}
else
{
codeSnippet
.
style
.
display
=
"
none
"
;
button
.
textContent
=
"
Expand the code
"
;
// 使用之前选中的按钮元素
}
}
</script>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment