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

Author:
aram148 <42922407+aram148@users.noreply.github.com>
Date:
2022-07-26 11:49:42+12:00
Desc:
updated documentation and renamed model
Permanent Source URI:
https://models.fieldml.org/workspace/7e5/rawfile/30e6db7fb82a9bb715b0121cdfc131c19e5cb2ff/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)