Modified the code to work with Octave 3.6.4 in Windows