mfile2sci() fails when the {function} block is closed with {end}
Reported by Keith OHara
Bug description:
mfile2sci does not recognize 'end' used to end of a Matlab function.
Error log:
end
!--error 34
Incorrect control instruction syntax.
at line 3 of function f called by :
comp(f,1)
in execstr instruction called by :
at line 200 of function mfile2sci called by :
mfile2sci("f.m")
How to reproduce the bug:
f = ["function y = f(x)"
" y = x;"
"end"];
mputl(f, "f.m");
mfile2sci("f.m")
Other information:
Same as bug 10541 with simpler test case