Extract Information Between M-Files
    5 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
If I want to pull an array from one file to another without defining global variables is there a command I can use?
0 Commenti
Risposta accettata
  Matt Kindig
      
 il 24 Apr 2013
        It depends how the m-files are defined. If they are scripts (that is, they are not defined by the 'function' keyword at the top), the variables defined in them are automatically added to the "base" workspace, which includes all variables included in all other script files that are run, regardless of whether they are defined as global or not.
If the m-files are functions, you will need to pass out the useful variables as output variables from your function. This is strongly preferred over using global variables.
This is best explained here:
0 Commenti
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Whos 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!