-
Notifications
You must be signed in to change notification settings - Fork 0
save2matlab
Cristel Chandre edited this page Jun 24, 2025
·
5 revisions
Saves the results of a simulation to a .mat file compatible with MATLAB.
-
sol: Solution object returned by an ODE solver (e.g.,solve_ivp), containing time and state arrays. -
filename: Name of the output file (default:'data'). The function saves tofilename.mat.
The following variables are saved in the .mat file:
-
t: Time array (sol.t). -
X: State variables (firstNrows ofsol.y, transposed). -
Xs: Desymmetrized state variables, transposed. -
Y: State variables$Y=\phi(X)$ . -
Ys: DesymmetrizedY. -
Casimirs: Casimir invariants (self.casimir_coeffs). -
phi: (str) Matlab function corresponding to the function$\phi(x)$ used in the computations. -
date: Current date. -
author: Hardcoded as'cristel.chandre@cnrs.fr'.
- Uses
scipy.io.savematto write the data. - Prints a confirmation message with the file name.
-
self.desymmetrizeis used to obtain symmetric-reduced data.
HamLorenz is developed under BSD 2-Clause License, Copyright(c) 2025 cristel.chandre@cnrs.fr