is it possible to write a function inside a script?
3 views (last 30 days)
Show older comments
is it possible to write a function inside a script? for example is it possible to put at the end of the script?
0 Comments
Accepted Answer
hatim boui
on 25 Jan 2017
1 Comment
Jan
on 25 Jan 2017
This has been discussed such frequently in this forum, that it got tedious. And now the answer has changed. Wow.
More Answers (2)
Lucijano Berus
on 19 Mar 2018
calling subfunctions: https://www.coursera.org/learn/matlab/lecture/9N7ZS/subfunctions
1 Comment
Walter Roberson
on 19 Mar 2018
subfunctions are not relevant to the question of whether you can define a function inside a script.
John D'Errico
on 28 Jun 2015
Short answer: No.
Longer answer: Nnnnnooooo.
Not much else I can say.
0 Comments
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!