home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / dos / educ / cf515 / convert.doc < prev    next >
Text File  |  1995-07-07  |  3KB  |  92 lines

  1.  USING CONVERT.EXE from the command line.
  2.  ----------------------------------------
  3.  
  4.                         ERRORS
  5.                         ------
  6.  If the format string is wrong the conversion fails almost immediately, 
  7.  and you are 'dumped' to DOS.  If this is done from within CurveFits, 
  8.  you will the get a message 'Error:empty file' because CurveFits is
  9.  trying to load the converted file which is empty.
  10.  
  11.  If the format string is nearly correct, but not quite, the conversion
  12.  process may work for the first few lines and then fail.
  13.  
  14.                         USAGE
  15.                         -----
  16.  
  17.  Type convert at the command line, You will then be asked for the name of 
  18.  the data file you wish to convert, and a formatting string for the text 
  19.  file data.
  20.  
  21.  For numbers you wish to use you will specify the code '%Le'
  22.  in the format while numbers that are to be ignored will be specified with
  23.  '%*Le'.  The format string will tell the program what each
  24.  line in your text file looks like, and therefore how it should be processed.
  25.  
  26.  For example, if your text data file looked like this  :
  27.   1.01232 12.8373
  28.   2.98210 4.87371
  29.  
  30.  You would use this format string :
  31.   %Le %Le
  32.  
  33.  If there are more than two numbers per line, you can specify which
  34.  numbers you want to use (realizing of course that CurveFits can only
  35.  use TWO data points).
  36.  
  37.  For a text data file that looks like this :
  38.  
  39.  16.9872E+02  16020202020.2  -1928.34E-02
  40.  123.32323   1.32233  22332.2
  41.  
  42.  If you wanted to use columns one and three use this format string :
  43.   %Le %*Le %Le
  44.  
  45.  or If your data appears like this :
  46.   1.4, 2.11
  47.   6.1, 12.32
  48.  
  49.  Use this format string :
  50.   %Le, %Le
  51.  
  52.  Compare this with the previous :
  53.   1.22982 ,    12121
  54.  
  55.  Format string :
  56.   %Le , %Le
  57.  
  58.  Any amount of consecutive spaces can be reduced to one space
  59.  but any spacing between commas, numbers etc MUST be noted. You
  60.  must also use an %Le or %*Le for EVERY number appearing on a line.
  61.  
  62.  another more complex example:
  63.  
  64.  Text File:
  65.   time = 1, velocity = 3, acceleration =         6.82287
  66.   time = 2, velocity = 4, acceleration =         5.28701
  67.  the appropriate format string is :
  68.   time = %Le, velocity = %*Le, acceleration = %Le
  69.  
  70.  In addition :
  71.  If for some reason each line of your text file has a % sign on it, 
  72.  you must account for it in the format string by using '%%'
  73.  for example, if the text file looks like:
  74.  5.98 99.23%
  75.  then the format string would be :
  76.  %Le %Le%%
  77.  
  78.  IMPORTANT!:
  79.  Keep in mind that THE FORMAT STRING IS CASE SENSITIVE!
  80.  If the conversion program fails immediately upon being called
  81.  it is most likely due to a incorrect format string.
  82.  The program shells to DOS and executes the program convert.exe.
  83.  Convert.exe MUST reside in the same directory as the file
  84.  CF515.EXE
  85.  
  86.  For further experimentation, from within CurveFits, load a sample data file.  
  87.  Convert it to a text file using the Data|Output Text option.  
  88.  Clear the desktop(File|Clear Desktop).  Now import the text file using 
  89.  the format string ' %Le %Le' (minus the quotes of course).  
  90.  Note the leading space.
  91.  
  92.