I\'m quite new to Matlab. I\'ve defined a function inside a .m file, I want to use that function in that .m file inside another .m file, and I want to run the contents of that l
In principle, MATLAB advocates the use of one function per .m
file. You can call such a function from another .m
file and from the MATLAB command line.
You can define multiple functions in one .m
file, but only the first (or 'outermost') function can be accessed from other .m
files or the command line. The other functions are treated as 'helper' functions that may be called only inside this particular .m
file.