home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 24
/
CD_ASCQ_24_0995.iso
/
dos
/
educ
/
cf515
/
convert.doc
< prev
next >
Wrap
Text File
|
1995-07-07
|
3KB
|
92 lines
USING CONVERT.EXE from the command line.
----------------------------------------
ERRORS
------
If the format string is wrong the conversion fails almost immediately,
and you are 'dumped' to DOS. If this is done from within CurveFits,
you will the get a message 'Error:empty file' because CurveFits is
trying to load the converted file which is empty.
If the format string is nearly correct, but not quite, the conversion
process may work for the first few lines and then fail.
USAGE
-----
Type convert at the command line, You will then be asked for the name of
the data file you wish to convert, and a formatting string for the text
file data.
For numbers you wish to use you will specify the code '%Le'
in the format while numbers that are to be ignored will be specified with
'%*Le'. The format string will tell the program what each
line in your text file looks like, and therefore how it should be processed.
For example, if your text data file looked like this :
1.01232 12.8373
2.98210 4.87371
You would use this format string :
%Le %Le
If there are more than two numbers per line, you can specify which
numbers you want to use (realizing of course that CurveFits can only
use TWO data points).
For a text data file that looks like this :
16.9872E+02 16020202020.2 -1928.34E-02
123.32323 1.32233 22332.2
If you wanted to use columns one and three use this format string :
%Le %*Le %Le
or If your data appears like this :
1.4, 2.11
6.1, 12.32
Use this format string :
%Le, %Le
Compare this with the previous :
1.22982 , 12121
Format string :
%Le , %Le
Any amount of consecutive spaces can be reduced to one space
but any spacing between commas, numbers etc MUST be noted. You
must also use an %Le or %*Le for EVERY number appearing on a line.
another more complex example:
Text File:
time = 1, velocity = 3, acceleration = 6.82287
time = 2, velocity = 4, acceleration = 5.28701
the appropriate format string is :
time = %Le, velocity = %*Le, acceleration = %Le
In addition :
If for some reason each line of your text file has a % sign on it,
you must account for it in the format string by using '%%'
for example, if the text file looks like:
5.98 99.23%
then the format string would be :
%Le %Le%%
IMPORTANT!:
Keep in mind that THE FORMAT STRING IS CASE SENSITIVE!
If the conversion program fails immediately upon being called
it is most likely due to a incorrect format string.
The program shells to DOS and executes the program convert.exe.
Convert.exe MUST reside in the same directory as the file
CF515.EXE
For further experimentation, from within CurveFits, load a sample data file.
Convert it to a text file using the Data|Output Text option.
Clear the desktop(File|Clear Desktop). Now import the text file using
the format string ' %Le %Le' (minus the quotes of course).
Note the leading space.