Changed output handeling of print matlab.

milestone 1