All looks fine to me.
One nifty way to improve this might be to have the user select the method, and to use a switch to select the correct function call.
Also, when I'm dictator I'm going to force Mathworks to implement a unary increment/decrement operator like C's ++/--.
|