matlab routines - s-function www.programmerall.com