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!