Even in Octave you shouldn't need eval here.
Also, this is completely undocumented code, and you don't explain what changes you want to make. It sounds to me like you need to implement an entirely different algorithm, but you don't explain the differences, nor what you have tried.
