Overloaded size function for matrices without a given dimension