works now on old version of matlab
Merge pull request #1 from flaviofontana/master

works now on old version of matlab