The fact that every function (excluding anonymous functions which are very limited) has to reside on a different file is very annoying, maybe because I'm used to other programming languages like C. It occurred to me that by making my main script a function I have the option of having functions defined in the same file,while I can still have other functions saved in their own file either because they are big enough to justify it, or they are used by other modules, etc.
One drawback is obvious: the workspace is not available after the program finishes. OK, I can live with that. Are there other factors to consider (needless to say I'm rather new to MATLAB)? I guess it cannot be really bad since when using GUIDE this is what happens anyway.
Best Answer