ANSI-C program: ascii2float.c
NAME
ascii2float -
Convert text format data to float format
SYNOPSIS
ascii2float <data_in> <width> <data_out>
[loff] [nl] [coff] [nv]
data_in | (input) input text format data file with , or whitespace between columns |
width |
number of data values (columns) in each line of
text |
data_out | (output) ouput data file (float) |
loff |
offset lines to start of
data (enter - for default: 0) |
nl |
number of lines (enter -
for default: all) |
coff |
offset columns to begin
reading data values (enter - for default: 0) |
nv |
number of values to read
(enter - for default: to end of line) |
ascii2float q.txt 16 q3
Converts the text file q.text with 16 columns of numbers to
the binary file q3
Each line of q3 has 16 values that are 4-byte floating point
numbers.
ascii2float q.txt 16 q3 2 14 2 8
Converts the text file q.text with 16 columns of numbers to
the binary file q3. The first 2 lines of the input text
file are skipped and the subsequent 14 lines are read. Each line
is processed by skipping the first 2 columns and then converting
8 values to 4-byte flot
SEE ALSO
float2ascii