add format control for mat-output