various general utilities for matlab