Example_Script

Example_Script()

EXAMPLE_SCRIPT Run the full spindle-dynamics analysis pipeline on example data and generate summary figures

Usage:

Example_Script

Inputs:

none (loads example_data/example_data1.mat from the repository)

Outputs:

none (side effects only - produces analysis figures)

Notes

Walks through model specification (specify_mdl), preprocessing (preprocessToDesignMatrix), Poisson GLM fitting (glmfit), and the full set of summary plots (history curve, stage preferred phase, SO-power preferred phase, KS goodness-of-fit, deviance explained). Accompanies Chen et al., PNAS 2025.

See also: quick_start, specify_mdl, preprocessToDesignMatrix, plot_hist_curve, plot_stage_prefphase, plot_sop_prefphase

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