If you haven't already figured it out, there's nothing much to an .m file. Since i do not warez matlab, i'm using vim (a text editor) and octave. Basically what goes in a .m file is something like this
function returnValue = f(x)
returnValue = 2*x^2 + 3*x+2
end
format long %for...
heh, last night (long night, ended at 3:30am, gotta love engineering) at the end of everything i was using octave (GNU/Matlab :P) and i was piping the results out to a text file, but tired me hit tab (in bash) and piped over my matlab file :(
Yeh, but there's still saddle points to deal with. (2nd derivate check)
Look it up in a good calculus textbook and the write out the procedure in maple...
As an engineer i use maple and matlab lots.
Maybe i'm a little biased because my school helps develop it with waterloo so it's unofficially taught but it's pretty nice and straight forward for calculus and linear algebra. I usually find that if i'm going to use mathematica i might as well use...