fixed quick matlab script