seems that all of them have different inputs, so you should do it in 4 different .m files.
subfunctions within a function .m file can only be called within the .m file, so if you want to write a function that can be called by other functions, write it as a separate .m file.
to output things from a .m file
function [variable1, variable 2] = filename(input1, input2)
where inputXX is your inputs, filename is the name of your function, and variableXX is what you wish to output.
|