Is it possible to write local function in a function?

1 次查看(过去 30 天)
Or this is possible only for scripts and not for functions?
  1 个评论
Adam
Adam 2018-10-16
A 'local' function inside a function is not possible, but as given in the answer below a 'nested' function is possible. They are not the same thing though. Nested functions have some nice properties and some unpleasant ones, though the latter often don't matter if you don't need to debug and work on the command line during a debug session in the parent function.

请先登录,再进行评论。

回答(1 个)

madhan ravi
madhan ravi 2018-10-16
It’s possible.See nested Function

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by