Tuesday, July 12, 2011

Joining string variables

When defining file names or titles, is often useful to join string variables in order to make our scripts more comprehensible. To do so, you have to join this variables using dots.
Example:
  • DATA='satellite'
  • DATE='12/07/12'
  • EXTENSION='dat'
  • set title DATA.' measurements - '.DATE
  • plot DATA.'_data.'.EXTENSION
This will plot the file "satellite_data.dat" and will entitle the plot as "satellite measurements - 12/07/12"

No comments:

Post a Comment