If you had 2 files, one a .m and one a .p, from the command line can you tell MatLab which file to run? If the file was names Test.m and Test.p and the file contained:
[~,~,ext] = fileparts(which(mfilename))
ext will always return .p, so is there anyway when you type "Test" in the command window, I can get the .m to run and not the .p? Would it be the same if Test took parameters? Test(param1, param2)
Best Answer