Is it possible to write local function in a function?

2 vues (au cours des 30 derniers jours)
Mr M.
Mr M. le 16 Oct 2018
Commenté : Adam le 16 Oct 2018
Or this is possible only for scripts and not for functions?
  1 commentaire
Adam
Adam le 16 Oct 2018
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.

Connectez-vous pour commenter.

Réponses (1)

madhan ravi
madhan ravi le 16 Oct 2018
It’s possible.See nested Function

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by