composition written in matlab