Engineering Design NIDisk Betriebsanweisung Seite 29

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 34
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 28
Exchanging Data Files between SIGNAL and MATLAB
Application Note 11 5
Exporting MATLAB floating point time and frequency files to
SIGNAL
MATLAB values are stored in floating point format, so all MATLAB data is exported as
headerless files in 32-bit floating point format. When reading these files, SIGNAL will query
the user to establish the time base of the data, since there is no file header to convey this:
Buffer
type Query parameters
T, F Sample rate
FT Sample rate, time range, no. time bins
1. The following will write the entire one-dimensional array A to the headerless floating
point file RFILE:
fid = fopen ('rfile','wb');
fwrite (fid,A,'float32');
2. Read the file into a SIGNAL buffer. The following will read the floating point (/F) file
RFILE into T buffer 1, assigning a sample rate of 25000 Hz:
>R T 1 /B /F
Sample rate: 25000
Filename: RFILE
Exchanging spectrogram files between SIGNAL and MATLAB
Spectrogram exchange requires special attention because spectrograms are two-dimensional
objects and can be stored in multiple ways. The target program must know two things in
order to correctly unpack a spectrogram file: 1) whether the data is stored by rows or by
columns and 2) the actual dimensions of the spectrogram rows and columns.
Row-Column Order
MATLAB and SIGNAL write spectrogram files in the same order – ascending frequency at
the earliest time value, then ascending frequency at the next time value, and so on. Thus the
following spectrogram, consisting of 3 rows and 4 columns,
Freq | 9 10 11 12
| 5 6 7 8
| 1 2 3 4
-------------------
Time
will be written by both programs in the following order in the file RFILE
Seitenansicht 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34

Kommentare zu diesen Handbüchern

Keine Kommentare