diff --git a/miscmaths.h b/miscmaths.h
index 8fd2f6ba703ff555e0d44c66e0088d28e135b9f8..963c20aae5b99217bb1916f1f9344918697241e4 100644
--- a/miscmaths.h
+++ b/miscmaths.h
@@ -41,6 +41,13 @@ namespace MISCMATHS {
   // IO/string stuff
   template <class T> string num2str(T n, int width=-1);
 
+  string size(const Matrix& mat)
+  {
+    string str = num2str(mat.Nrows())+"*"+num2str(mat.Ncols());
+        
+    return str;
+  }
+
   bool isnum(const string& str);
   ReturnMatrix read_ascii_matrix(const string& filename, int nrows, int ncols);
   ReturnMatrix read_ascii_matrix(int nrows, int ncols, const string& filename);