Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Problem accessing a variable in workspace
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (2개)
Jan
2012년 3월 22일
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
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!