Mercurial > hg > octave-nkf
diff scripts/io/strread.m @ 14799:21197c43f984
Better Matlab compatibility of textscan, bugs #36356 and #36392
textscan.m: ensure trailing newline in data string before calling strread in
case of CollectOutput parameter
test added for uneven data column lengths + CollectOutput
return cell array of proper dimension when no data were read
rewrote parts of texinfo help text
* strread.m: add explanation of role of trailing newline to texinfo help text
author | Philip Nienhuis <prnienhuis@users.sf.net> |
---|---|
date | Fri, 22 Jun 2012 19:09:30 +0200 |
parents | e97ec01d4157 |
children | a922f768ee09 |
line wrap: on
line diff
--- a/scripts/io/strread.m +++ b/scripts/io/strread.m @@ -154,7 +154,21 @@ ## ## @end table ## -## @seealso{textscan, textread, load, dlmread, fscanf} +## When the number of words in @var{str} doesn't match an exact multiple +## of the number of format conversion specifiers, strread's behavior +## depends on the last character of @var{str}: +## +## @table @asis +## @item last character = "\n" +## Data columns are padded with empty fields or Nan so that all columns +## have equal length +## +## @item last character is not "\n" +## Data columns are not padded; strread returns columns of unequal length +## +## @end table +## +# @seealso{textscan, textread, load, dlmread, fscanf} ## @end deftypefn function varargout = strread (str, format = "%f", varargin)