Is it possible to write local function in a function?

1 回表示 (過去 30 日間)
Mr M.
Mr M. 2018 年 10 月 16 日
コメント済み: Adam 2018 年 10 月 16 日
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 Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by