How to Access a Variable's Value in a Nested Function?
이전 댓글 표시
How Can I see the value of variable g in Command window and Workspace?
function parentfcn(b)
a = b+1
function childfcn
g = a+1
end
end
댓글 수: 1
Adam
2017년 2월 28일
The shared workspace of a nested function and the main function is not bi-directional. The nested function has access to everything in the workspace of the main function, but not the other way around.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!