Just save your function MyBisect.m in a folder that either already is on the Matlab path, or save it in a folder, and then add that folder to the Matlab path with
>>addpath 'path/to/folder'
or use pathtool
For example, assume that you are using Windows and that you create a folder called mfiles. Save MyBisect.m in that folder and then enter
>>addpath 'c:\mfiles'
After that command executes, you should be able to enter
>>which MyBisect
and see that Matlab recognizes the path to the Matlab program.
Now you should be able to call it from the command line with the syntax:
[x,e]=MyBisect(f,a,b,n)