Geoscience Reference
In-Depth Information
before being analyzed with MATLAB. Alternatively, the sot ware provides
several import routines to read many binary data formats in earth sciences,
such as those used to store digital elevation models and satellite data.
A computer generally stores data as binary digits or bits . A bit is analogous
to a two-way switch with two states, on = 1 and of = 0. h e bits are joined
together to form larger groups, such as bytes consisting of 8 bits, in order
to store more complex types of data. Such groups of bits are then used to
encode data, e.g., numbers or characters. Unfortunately, dif erent computer
systems and sot ware use dif erent schemes for encoding data. For instance,
the characters in the widely-used text processing sot ware Microsot Wo r d
dif er from those in Apple Pages. Exchanging binary data is therefore dii cult
if the various users use dif erent computer platforms and sot ware. Binary
data can be stored in relatively small i les if both partners are using similar
systems of data exchange. h e transfer rate for binary data is generally faster
than that for the exchange of other i le formats.
Various formats for exchanging data have been developed during recent
decades. h e classic example for the establishment of a data format that can
be used with dif erent computer platforms and sot ware is the American
Standard Code for Information Interchange (ASCII) that was i rst published
in 1963 by the American Standards Association (ASA). As a 7-bit code,
ASCII consists of 2 7 =128 characters (codes 0 to 127). Whereas ASCII-1963
was lacking lower-case letters, in the ASCII-1967 update lower-case letters
as well as various control characters such as escape and line feed, and various
symbols such as brackets and mathematical operators, were also included.
Since then, a number of variants appeared in order to facilitate the exchange
of text written in non-English languages, such as the expanded ASCII
containing 255 codes, e.g., the Latin-1 encoding.
h e simplest way to exchange data between a certain piece of sot ware
and MATLAB is using the ASCII format. Although the newer versions of
MATLAB provide various import routines for i le types such as Microsot
Excel binaries, most data arrive in the form of ASCII i les. Consider a simple
data set stored in a table such as
SampleID Percent C Percent S
101 0.3657 0.0636
102 0.2208 0.1135
103 0.5353 0.5191
104 0.5009 0.5216
105 0.5415 -999
106 0.501 -999
h e i rst row contains the names of the variables and the columns provide
the percentages of carbon and sulfur in each sample. h e absurd value -999
Search WWH ::




Custom Search