% It is important to run "clear functions", % as foo.mexw64 or something similar % may not be updated during compilation, % since it may be locked by matlab. % Similarly, if you want to delete *.mexw64, % or similar files, you need to run "clear functions". clear functions; compile(); a = 0:50; b = 100:150; output = foo(a,b); output