3 ms·
You can define a second function in a file, with the constraint that it can only be used by the main function (I think). The following could happily go in one f
by SandB0x 17y ago
You can define a second function in a file, with the constraint that it can only be used by the main function (I think). The following could happily go in one file named foo.m:
function rtn = foo(x)
rtn = bar(x) + 1
function rtn = bar(x)
rtn = x^2