Download Engineering Design NIDisk User guide

Transcript
SIGNAL/RTS APPLICATION NOTES
These formats are used by the following hardware platforms:
Little-endian
IBM PC
VAX
DEC Alpha
Big-endian
Macintosh
NexT
Sun
IBM RS6000
SGi Iris
To transfer data into or out of MATLAB to a hardware platform using a different byte-order,
use the optional FORMAT parameter in the FOPEN statement to specify the byte-order order
of the incoming or outgoing data. MATLAB will then perform byte conversion as necessary.
For example, to import data from SIGNAL on the PC to MATLAB on a non-PC platform,
open the data file in MATLAB using the following (the field stands for IEEE format, littleendian, the byte format of PC data). MATLAB will then convert the data from this format to
the format of its native machine.
fid = fopen ('myfile','rb','ieee-le')
Similarly, to export data from MATLAB on a non-PC platform to SIGNAL on a PC, have
MATLAB store the data in little-endian IEEE format (ready for use by SIGNAL on the PC)
by including the following:
fid = fopen ('myfile','wb','ieee-le')
4-4-99
Rev 1-15-04
10
Application Note 11