diff scripts/general/num2str.m @ 4295:fea24da316a2

[project @ 2003-01-11 04:23:24 by jwe]
author jwe
date Sat, 11 Jan 2003 04:23:24 +0000
parents 40153a2affd6
children bdc51b369a78
line wrap: on
line diff
--- a/scripts/general/num2str.m	Sat Jan 11 04:02:04 2003 +0000
+++ b/scripts/general/num2str.m	Sat Jan 11 04:23:24 2003 +0000
@@ -39,7 +39,11 @@
 	fmt = sprintf ("%%.%dg", arg);
       endif
     else
-      fmt = "%11.4g";
+      if (isscalar (x))
+	fmt = "%.4g";
+      else
+	fmt = "%11.4g";
+      endif
     endif
     if (iscomplex (x))
       error ("num2str: sorry, can't handle complex numbers yet");