Location: Hodgkin & Huxley (1952) model @ 33ec3acb84c3 / sed-ml / scripts_BG / Na_gating_h.m

Author:
WeiweiAi <wai484@aucklanduni.ac.nz>
Date:
2021-11-15 15:37:56+13:00
Desc:
Modify the option and layout of plots
Permanent Source URI:
https://staging.physiomeproject.org/workspace/64f/rawfile/33ec3acb84c3155258d02bb680033a714882636e/sed-ml/scripts_BG/Na_gating_h.m

clear;
clc;
close all;
addpath(genpath('../../cellLib/BG_fit/'))
T = 279.45;
phi = 3^((T - 6.3-273.15) / 10);

%% Steady-state gating parameters and time constants
V = transpose(-120:1:60); % unit mV
[alpha,beta]=HH_gate_h(-(V+75),phi);
TF = isnan(alpha);
alpha(TF)=1;
tau = calc_tau(alpha,beta);
g_ss = calc_gss(alpha,beta);
%% Optimization to fit
[params_vec,fval,exitflag,output] = gate_fit(alpha,beta,g_ss,tau,V,T);
save(['Na_h_parameters.mat'],'params_vec');
%% Plot
h = figure;
x0=100;
y0=50;
height=350*2;
width=400*2;
set(gcf,'position',[x0,y0,width,height])
gate_plot(alpha,beta,g_ss,tau,params_vec,V,T);
filename='h_gate.fig';
savefig(h,filename)

function [alpha_h,beta_h]=HH_gate_h(V,phi)

alpha_h = 0.07 .* exp( V ./ 20 ) .* phi;
beta_h = phi ./ (exp( (V + 30) ./10 ) + 1);
end