How to run examples
Our examples suite contains two primary file types:
- Simulink Models (
.slxfiles) - Live Script Notebooks (
.mlxfiles)
Some demos can be opened and run directly in Simulink using their .slx file, while others require you to launch the provided .mlx notebook (which in turn calls the underlying .slx). We’ve indicated in the table below which demos can run straight from .slx and which must be started via their .mlx wrapper.
1. Simulink models (.slx)
- What it is: A standalone Simulink model that you open directly.
- When to use: For demos that focus on block-diagram configuration, real-time simulation entirely within Simulink.
-
How to launch (if permitted):
- Open MATLAB and navigate to the folder containing
DemoName.slx. - Double-click
DemoName.slx(or runopen('DemoName.slx')in the Command Window). - Click Run (▶) in the Simulink toolbar.
- Open MATLAB and navigate to the folder containing
Note: If this demo is marked as “Launch via .mlx,” you cannot open the .slx file directly, you must start it from the corresponding live script.
2. Example notebooks (.mlx)
- What it is: An interactive MATLAB Live Script that combines explanatory text, code cells, and inline plots.
- When to use: For demos that guide you through data loading, plotting, and analysis.
-
How to launch:
- Open MATLAB and navigate to the folder containing
DemoName.mlx. - Double-click
DemoName.mlx(or runopen('DemoName.mlx')in the Command Window). - In the Live Editor, click Run Section (or press Ctrl+Enter) to execute each code section in order.
- Open MATLAB and navigate to the folder containing
Below is a table listing each demo, its primary file type, and whether it can be run directly or must be called through its .mlx notebook:
| Demo Name | File Extension | Run Directly? | Launch via |
|---|---|---|---|
| Discharge demo | .slx |
Yes | Demo_discharge.slx |
| CCCV cycling demo | .slx |
Yes | Demo_CCCV.slx |
| Generic simulation | .slx |
No | Getting_started.mlx |
| ECM Generation | .slx |
No | ECM_generation.mlx |
| Simulating aged cells | .slx |
No | Fast_Charge_Aging.mlx |