fixed example for matlab