# HG changeset patch # User John W. Eaton # Date 1231914475 18000 # Node ID 841f8e3370c6b98f819681c1662f4844128c0f35 # Parent dee629f14bfa808ec6809f11877ca5c43d560a16 dlmwrite.m: use '%c' format for character data diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2009-01-14 John W. Eaton + + * io/dlmwrite.m: Use '%c' format for character data. + 2009-01-13 John W. Eaton * general/repmat.m: Handle negative row or column dimension. diff --git a/scripts/io/dlmwrite.m b/scripts/io/dlmwrite.m --- 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