Matlab/MatlabIntro

From mn/geo/geoit
Revision as of 11:32, 14 September 2011 by Jfb (talk | contribs) (Created page with "<rst> * Squared brackets concatenate strings: This works also for other matrices To add a path and a filename, for instance, use :: a = ['pathto/' 'myfile']; ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

<rst>

  • Squared brackets concatenate strings:
 This works also for other matrices
 To add a path and a filename, for instance, use
 
 ::
 
   a = ['pathto/' 'myfile'];


  • Use *textread* to read in ASCII files
 *'headerlines'* skips lines in the beginning
 
 The format string tells which kind of variable to read.
 
 ::
 
 [a b c] = textread( file, '%5n %3f', 'headerlines', 2);
 An empty format string reads the whole file
 ::
 
 [a] = textread( file, , 'headerlines', 2);


</rst>