Mercurial > hg > octave-nkf
comparison scripts/io/dlmwrite.m @ 11032:c9b0a75b02e8
Make all regexp in Octave compatible with both POSIX and PCRE.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Tue, 28 Sep 2010 09:25:14 -0700 |
parents | 306e40d773a9 |
children | 994e2a93a8e2 |
comparison
equal
deleted
inserted
replaced
11031:d81b6144c4ba | 11032:c9b0a75b02e8 |
---|---|
170 if (r > 0) | 170 if (r > 0) |
171 fprintf (fid, "%s", | 171 fprintf (fid, "%s", |
172 repmat ([repmat(delim, 1, c + columns(a)-1), newline], 1, r)); | 172 repmat ([repmat(delim, 1, c + columns(a)-1), newline], 1, r)); |
173 endif | 173 endif |
174 if (iscomplex (a)) | 174 if (iscomplex (a)) |
175 cprecision = regexprep (precision, '^%([-\d.])','%+$1'); | 175 cprecision = regexprep (precision, '^%([-.0-9])','%+$1'); |
176 template = [precision, cprecision, "i", ... | 176 template = [precision, cprecision, "i", ... |
177 repmat([delim, precision, cprecision, "i"], 1, ... | 177 repmat([delim, precision, cprecision, "i"], 1, ... |
178 columns(a) - 1), newline ]; | 178 columns(a) - 1), newline ]; |
179 else | 179 else |
180 template = [precision, repmat([delim, precision], 1, columns(a)-1),... | 180 template = [precision, repmat([delim, precision], 1, columns(a)-1),... |