A few functions to simplify generic matlab usage.