Sunday, January 30, 2011

LaTeX 'dash' usage

In LaTeX, use:

hyphen (-) : in compound words [daughter-in-law]
en-dash (--) : in number ranges [pages 31--45]
em-dash (---) : the normal dash in English punctuation
minus ($-$) : the math symbol

Tuesday, January 18, 2011

Reading data from file in matlab

If  the file is nicely formatted (without headers, consistent tab/space separated columns, and nothing else)
  • A = load('filename'); 
Other options include textscan, fscanf etc. - not yet tried them.

Tuesday, January 4, 2011

Linux shell options

Use command shopt to see and set linux shell options.

For example, shopt -s extglob  sets extglob to on. You can now use negative glob expressions in commands, such as rm !(*.dnd) to delete all files except those ending with .dnd.