is it possible to write a function inside a script?

15 visualizaciones (últimos 30 días)
Mr M.
Mr M. el 28 de Jun. de 2015
Comentada: Walter Roberson el 19 de Mzo. de 2018
is it possible to write a function inside a script? for example is it possible to put at the end of the script?

Respuesta aceptada

hatim boui
hatim boui el 25 de En. de 2017
you can in MATLAB R2016b or later. functions in scripts
  1 comentario
Jan
Jan el 25 de En. de 2017
This has been discussed such frequently in this forum, that it got tedious. And now the answer has changed. Wow.

Iniciar sesión para comentar.

Más respuestas (2)

Lucijano Berus
Lucijano Berus el 19 de Mzo. de 2018
calling subfunctions: https://www.coursera.org/learn/matlab/lecture/9N7ZS/subfunctions
  1 comentario
Walter Roberson
Walter Roberson el 19 de Mzo. de 2018
subfunctions are not relevant to the question of whether you can define a function inside a script.

Iniciar sesión para comentar.


John D'Errico
John D'Errico el 28 de Jun. de 2015
Short answer: No.
Longer answer: Nnnnnooooo.
Not much else I can say.

Categorías

Más información sobre Block and Blockset Authoring 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