function handle and Subfunction in the command window
显示 更早的评论
Hello,
I am working on this quiz question and I don't really understand how this code is working. I have the code attached as an image.
Starting with V2, I see it is myfun2(10,11). I already see that myfun2 is not defined in this folder, so I rule it to be undefined and thus an error.
For V1, start with myfun1(10,11). Then see that V is the LOCAL_myfun2(10,11), with is a+b = 21.
I don't really understand how the H = @LOCAl_myfun2 is working.
Thanks for any clarification of subfunctions and function handles. Also, how does this question depend on whether its run in myfun1.m file, or the command window?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Function Creation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!