Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Problem accessing a variable in workspace
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have generated a variable in a program and want to use the same variable from workspace in other program. I dont want to use it like an argument into a function but just as a variable from work space.
For example: I generated a variable 'a' with valid data in workspace and want to use it in other program for other computations without actually declaring the variable in the later program.
Thankyou!
0 comentarios
Respuestas (2)
Jan
el 22 de Mzo. de 2012
You could define the variable as global in the baseworkspace and inside the function.
But I recommend to transport variables as function arguments. When your program grows, the global sharing of variables will cause more and more troubles until the program cannot be maintained or expanded any longer.
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!