it is possible to access the 'base' workspace from a subfonction ?
조회 수: 6 (최근 30일)
이전 댓글 표시
I'm would like to access some variables in the 'base' workspace from a subfonction. because when I tried the variables is not found.
thanks in advance ;)
댓글 수: 0
채택된 답변
Daniel Shub
2012년 7월 17일
Yes if is possible to manipulate and access the base workspace from within a function. Just because MATLAB provides this functionality, however, doesn't mean it is a good idea to use it. Please consider alternatives.
The functions you are looking for are EVALIN and ASSIGNIN.
댓글 수: 2
추가 답변 (1개)
khaled DAWOUD
2012년 7월 17일
you can use assignin function to reference to variable in the workspace in your function.
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!