This MATLAB (The MathWorks, Natick, MA) source code provides an implementation of a 2D Multi-Electrode Array (MEA) electrophysiology model for cardiac tissues composed of human induced pluripotent stem cell–derived cardiomyocytes (hiPSC-CMs).
The framework couples a phenotype-specific ionic model with tissue-level intra- and extracellular diffusion operators and synthetic MEA electrode measurements. It supports heterogeneous cell populations, configurable electrode layouts, and spatially localized stimulation.
The model is intended for computational cardiology, in-silico MEA experiments, and tissue simulations.
- Dr. Sofia Botti (Euler Institute, USI)
- Dr. Marco Favino (Euler Institute, USI)
The software is provided with NO WARRANTY and is licensed under the BSD 2-Clause "Simplified" License.
- 2D structured grid tissue discretization
- Intracellular and extracellular conductivity operators
- Mass and diffusion matrix assembly
- Configurable MEA layouts (1, 9, 64, 256 electrodes)
- Circular electrode sensing regions
- Spatial phenotype heterogeneity
- Mixed resting potentials from different parameter sets
- Localized external stimulation current
- Configurable pacing time window
- MATLAB R2022a or later versions
- No mandatory external toolboxes required
main_MEA.m— main simulation scriptMEA.m— MEA simulation classPointGrid.m— grid and geometry utilitiesassembleMatricesH.m— mass and diffusion matrix assemblybuild_fk.m— electrode kernel buildercodici_el/— electrode and auxiliary functions
-
Run the main file:
main_MEA.m -
The script performs:
- grid generation and matrix assembly
- conductivity definition
- phenotype heterogeneity assignment
- MEA electrode placement
- stimulus definition
- time integration of the coupled ionic–tissue model
- MEA signal computation
Geometry
- domain size and mesh resolution
- number of elements per direction
Conductivities
- intracellular and extracellular conductivities
Heterogeneity
- percentage of AL-type cells (
percentuale_AL)
Resting Potentials
- mixed resting states from two parameter sets
Stimulation
- stimulus amplitude and start/stop time
MEA configuration
- number of electrodes (
nk) - electrode spacing
- sensing radius
Time integration
- final time
- timestep size
Depending on the MEA class configuration, the simulation produces:
- transmembrane potential evolution
- extracellular potentials
- synthetic MEA electrode signals
- tissue activation maps