Location: Peripheral airways matlab/CellML @ fae2d0272123 / PASMC_models / PA_script.m

Author:
aram148 <a.rampadarath@auckland.ac.nz>
Date:
2022-05-06 13:02:19+12:00
Desc:
Draft PASMC 0D models
Permanent Source URI:
https://staging.physiomeproject.org/workspace/7e5/rawfile/fae2d027212396d5103d15523a3d1edbe5c0273c/PASMC_models/PA_script.m

%% Script for non-linear P-Q model



Q0 = 0;
V0 = 1;

y0 = [V0; Q0];

tspan = linspace(0,1,1000);

    % Set numerical accuracy options for ODE solver
options = odeset('RelTol', 1e-08, 'AbsTol', 1e-08, 'MaxStep', 0.01);

[t,N]=ode15s(@(t,y) PASM(t,y), tspan, y0, options);
for i =1:length(N)
[v(i),q(i),A(i),P(i)]=PASM1(t(i),N(i,:));
end

plot(t,P)