textread
Read data from a text file.
(a, b, c, d, ...)=textread(filename, format, param1, param1value, param2, param2value, ...)
Inputs
filename The name of the text file from which to read the data.
format The format string. See below.
{param1, param1value, ...} Name-value paramters to be used for reading the data.
Outputs
{a, b, c,...} The arrays read from the file.


Description
The format string contains one or more of the following format specifications.

   %f      For reading a double.  
   %s      For reading a string.  
   %d      For reading an integer.  
   %*f      For skipping a double.  
   %*s      For skipping a string.  
   %*d      For skipping an integer.  

The following parameters (param and paramValue pairs) may also be specified:

   "whitespace"      A string containing the characters to be used as whitespace.  
   "commentStyle"      "shell" (comment starting with # )
"matlab" (comment starting with % ")
"c++" (comment starting with // )
"c" (comment enclosed by /* and */ ).  
   "headerlines"      The number of lines to skip at the beginning of the file.  

Example
>>showfile("textreadtest.d")
#
Name0   string0   5.48 234 word0
#
#
name1  string1  6.48 334 word1
>>(a,b,c,d)=textread("textreadtest.d","%s %s %*f %d %s","commentStyle","shell")
>>a
  Name0
  name1
>>b
  string0
  string1
>>c
        234
        334
>>d
  word0
  word1
>>(a,b,c,d,e)=textread("textreadtest.d","%s %s %f %d %s","commentStyle","shell")
>>a
  Name0
  name1
>>b
  string0
  string1
>>c
    5.4800
    6.4800
>>d
        234
        334
>>e
  word0
  word1