Retrieve commands from .mat file

11 vues (au cours des 30 derniers jours)
Joel George Thomas
Joel George Thomas le 23 Juil 2019
Modifié(e) : Stephen23 le 23 Juil 2019
I saved my command window with all the commands to a .mat file. When I reopen the .mat file, I was able to load the .mat but couldn't retrieve my commands in the command window.
Is there any way to retrieve these commands?
  3 commentaires
Stephen23
Stephen23 le 23 Juil 2019
Modifié(e) : Stephen23 le 23 Juil 2019
.mat files are designed to contain variable data, not commands.
You can retrieve commands using the command history, or the diary function:
Walter Roberson
Walter Roberson le 23 Juil 2019
It is technically possible to retrieve the command history and store it in a variable that you then store in a file. I doubt that has been done, but it could have been done.

Connectez-vous pour commenter.

Réponses (1)

Alex Mcaulley
Alex Mcaulley le 23 Juil 2019
Modifié(e) : Alex Mcaulley le 23 Juil 2019
.mat files only store variables from the workspace.
To retrieve command history:

Catégories

En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by