How can i keep my variables after running the function?
Ältere Kommentare anzeigen
I have written a function that does some data anlayising on a table and then I have another function that uses that analysed data and does further analyses on it. The two functions used to be one but I have separated them. Is it possible to keep the variables once a function has run as currently all the variables in the function are cleared after running it.
Many thanks,
Nima
2 Kommentare
KALYAN ACHARJYA
am 15 Jul. 2019
Variabes from function file or main script?
Stephen23
am 15 Jul. 2019
By far the simplest, neatest, and most efficient way to pass variables from one workspace to another is to pass them as input/output variables. Have you tried doing that?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Variables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!