dlmwrite.m: use '%c' format for character data
author |
John W. Eaton <jwe@octave.org> |
date |
Wed, 14 Jan 2009 01:27:55 -0500 |
parents |
dee629f14bfa |
children |
738cb6271933 |
files |
scripts/ChangeLog scripts/io/dlmwrite.m |
diffstat |
2 files changed, 9 insertions(+), 1 deletions(-)
[+]
|
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-14 John W. Eaton <jwe@octave.org>
+
+ * io/dlmwrite.m: Use '%c' format for character data.
+
2009-01-13 John W. Eaton <jwe@octave.org>
* general/repmat.m: Handle negative row or column dimension.
--- a/scripts/io/dlmwrite.m
+++ b/scripts/io/dlmwrite.m
@@ -93,7 +93,11 @@
r = 0;
c = 0;
newline = "\n";
- precision = "%.16g";
+ if (ischar (a))
+ precision = "%c";
+ else
+ precision = "%.16g";
+ endif
opentype = "wt";
## process the input arguements