added matlab functions for display