Do not name your functions with names that you think MatLab might already
be using for something. For example, do not call your function any of the
following: factor, network, square, poly, ... If you can think of a reason
MatLab would have a function with a certain name already, then it probably does.
You can find out if there is already a function defined with a certain name
by trying to look it up in the help. If you do accidentally name your function
after something that MatLab has already defined, some weird things can happen.
Also, make sure to save your .m file as the same name of your function. If you
don't, then it won't work.