Modeling physiological functions in matlab