added command-line Matlab function for compiled version