advantages of nested functions

2 次查看(过去 30 天)
Muazma Ali
Muazma Ali 2021-12-6
回答: Matt J 2021-12-6
Hi ! :)
I am wondering about what the advantages are of using nested functions other than that the workspace of parent function will be available fo rnested functions. If I had written a long function, would it have taken longer time to run that function than if I had nested som functions within a parent function..?

回答(1 个)

Matt J
Matt J 2021-12-6
Another advantage is that it allows you to store function parameters in handles, see,

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by