doc: chapter matlab updated. minor changes in functions