W = evalin('caller','who global') returns an error
조회 수: 2 (최근 30일)
이전 댓글 표시
The command
evalin('caller','who global')
correctly returns the global variables in the caller workspace, but
W = evalin('caller','who global')
returns the error message
Error: illegal use of the reserved keyword global
Yet the syntax of the line that throws the error is consistent with the prescribed use of evalin. Is this a bug? What's the workaround? Thanks
댓글 수: 3
Walter Roberson
2020년 6월 10일
I would disagree on that checking. You want to encourage migration to passing variables as parameters, to reduce the reliance on global variables.
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!