How can I save a variable from the workspace to use it for another script?
48 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I want to save this variable for use that (and other one) in a brand new script
1 Commento
Stephen23
il 2 Ott 2021
By far the best approach is to use functions (not scripts) and pass the data as input/output arguments:
Risposta accettata
DGM
il 2 Ott 2021
You can save variables to a .mat file and then load the .mat file in the other script.
In practice, it's a good idea to load into a struct and explicitly define the incoming variable:
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Structures in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!