comparison 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
comparison
equal deleted inserted replaced
14798:fce841c941a5 14799:21197c43f984
152 ## Unless whitespace is set to '' (empty) AND at least one "%s" format 152 ## Unless whitespace is set to '' (empty) AND at least one "%s" format
153 ## conversion specifier is supplied, a space is always part of whitespace. 153 ## conversion specifier is supplied, a space is always part of whitespace.
154 ## 154 ##
155 ## @end table 155 ## @end table
156 ## 156 ##
157 ## @seealso{textscan, textread, load, dlmread, fscanf} 157 ## When the number of words in @var{str} doesn't match an exact multiple
158 ## of the number of format conversion specifiers, strread's behavior
159 ## depends on the last character of @var{str}:
160 ##
161 ## @table @asis
162 ## @item last character = "\n"
163 ## Data columns are padded with empty fields or Nan so that all columns
164 ## have equal length
165 ##
166 ## @item last character is not "\n"
167 ## Data columns are not padded; strread returns columns of unequal length
168 ##
169 ## @end table
170 ##
171 # @seealso{textscan, textread, load, dlmread, fscanf}
158 ## @end deftypefn 172 ## @end deftypefn
159 173
160 function varargout = strread (str, format = "%f", varargin) 174 function varargout = strread (str, format = "%f", varargin)
161 175
162 ## Check input 176 ## Check input