how to slove Function definitions are not permitted in this context?

1 visualización (últimos 30 días)
fatemeh p
fatemeh p el 5 de Abr. de 2018
Comentada: Walter Roberson el 5 de Abr. de 2018

Respuestas (1)

Steven Lord
Steven Lord el 5 de Abr. de 2018
The ability to create scripts containing local functions was introduced in release R2016b. If you are using an older release, you cannot include a local function inside a script file.
If you are using release R2016b or later, is this your entire script file? You're not trying to define the local function inside a for or while loop or inside an if / elseif / else block, are you?
  2 comentarios
fatemeh p
fatemeh p el 5 de Abr. de 2018
oh,i'm using an older release R2015a. thank you very much
Walter Roberson
Walter Roberson el 5 de Abr. de 2018
You will need to put the function into a different file.
You do not appear to be invoking the function?

Iniciar sesión para comentar.

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by