Is it possible to write local function in a function?

Or this is possible only for scripts and not for functions?

1 Commento

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.

Accedi per commentare.

Categorie

Scopri di più su Creating, Deleting, and Querying Graphics Objects in Centro assistenza e File Exchange

Tag

Richiesto:

il 16 Ott 2018

Commentato:

il 16 Ott 2018

Community Treasure Hunt

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

Start Hunting!

Translated by