plot_hist_curve

plot_hist_curve(stats, ModelSpec, BinData)

PLOT_HIST_CURVE Compute history modulation curves, derived features, and plot the history curve

Usage:

[xlag, yhat, yu, yl, hist_features] = plot_hist_curve(stats, ModelSpec, BinData)

Inputs:

stats : struct - GLM results returned by glmfit – required ModelSpec : struct - model specification (binsize, hist_ord, control_pt, …) – required BinData : struct - binned data (sp, isis, …) – required

Outputs:

xlag : nx1 double - history time lag in seconds yhat : nxk double - history modulation (rate multiplier) values yu : nxk double - upper 95 percent confidence bound yl : nxk double - lower 95 percent confidence bound hist_features : struct - derived features of the history curve

Notes

k = 1 for a single history curve; k = 2 when stage-dependent N2/N3 curves are requested (col 1 = N2, col 2 = N3). n = hist_ord / sp_resol. hist_features fields:

ref_period : refractory period (s) exc_period : excited period (s) p_time : peak time (s) p_height : peak height AUC_is : area under the infraslow period (40-70 s), only when

‘long’ history is specified

Accompanies Chen et al., PNAS 2025.

See also: compute_hist_features, FinerModCardinalSpline, glmval, shadebounds

∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿