major bug fix: faulty equation transcription to matlab