Engineering Design NIDisk Guia do Utilizador Página 28

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 34
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 27
SIGNAL/RTS APPLICATION NOTES
4 Application Note 11
fid = fopen ('rfile','rb');
fseek(fid,1024,'bof');
A = fread (fid,inf,'float32');
3. Example: calculate the power spectrum of TWEET.1 in SIGNAL and store it as a
SIGNAL-header floating point file, then read and plot this file in MATLAB. To display this
file correctly, you must know its FFT length (8192 points) and sample rate (25000 Hz).
>R T 1 In SIGNAL
Filename: C:\SIGNAL\TWEET.1
>XF T 1 1
>W F 1
Filename: TWEET.F
fid = fopen ('tweet.f','rb'); In MATLAB
fseek(fid,1024,'bof');
A = fread (fid,inf,'float32');
X = [0:(length(A)-1)] * (25000/8192);
plot(X,A);
Headerless floating point files
1. Write the SIGNAL T or F buffer to a headerless floating point file. The following will
write time buffer 1 to the headerless file RFILE in floating point (/F) format.
>W T 1 /B /F
Filename: RFILE
2. Read the file into a MATLAB array. The following MATLAB commands will read the
entire floating point file RFILE into the array A.
fid = fopen ('rfile','rb');
A = fread (fid,inf,'float32');
Vista de página 27
1 2 ... 23 24 25 26 27 28 29 30 31 32 33 34

Comentários a estes Manuais

Sem comentários