This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
There is a bug in Simulink 6.2 (R14SP2) that results the hidden breakpoints in the Embedded MATLAB Function block. If you create a breakpoint at a line in the Embedded MATLAB Function block, and then subsequently change the line such that a breakpoint cannot exist at that point, the red dot indicating a breakpoint is not visible, but the breakpoint still retains.
If text is later entered on one of these lines, a breakpoint automatically appear. Normally this behavior does not lead to errors, however if the hidden breakpoint is on a line past the end of the file, you receive the above error.
To work around this issue, you must find and remove the hidden breakpoint beyond the end of the file. Go to the last line of the file and repeatedly type 'a' followed by return to add lines to the end of the file. Continue to do this until you see a red dot on the left indicating a breakpoint. Click on the dot to remove the breakpoint, delete all the added text, and then save your model. It should now run without errors.