Modified the matlab script to run correctly.