Programmer Guide/Command Reference/EVAL/dft: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
=====dft=====
Inverse or forward discrete fourier transform (dft).
;Usage:<code>dft(<var>x</var> {, <var>type</var>)</code>
:;<var>x</var>:the data vector to be transformed
:;<var>type</var>:selects the data type of the argument and result and the transformation to be performed (default=0)
;Result:A vector ''y'' containing the result of the transformation. The length and content of ''y'' depends on ''x'' and ''type''.
:{|class="einrahmen"
!''type'' !! ''x'' !! nrow(''x'') !! ''y'' !! nrow(''y'') !! description
|-
|'''0'''
|real signal with N samples
|N
|complex spectrum with N/2+1 values
|N+2
|forward <code>real&rarr;complex</code> dft<BR>note: only the first half (values: 0..N/2) of the conj. sym. complex spectrum is stored in ''y''
|-
|'''1'''
|complex signal with N samples
|2N
|complex spectrum with N values
|2N
|forward <code>complex&rarr;complex</code> dft
|-
|'''2'''
|first half (values: 0..N/2) of a conj. sym. complex spectrum
|N+2
|real signal with N samples
|N
|inverse <code>complex&rarr;real</code> dft<BR>note: this is the inverse of ''type''=0
|-
|'''3'''
|complex spectrum with N values
|2N
|complex signal with N samples
|2N
|inverse <code>complex&rarr;complex</code> dft
|-
|}
;See also: [[../fft|fft]], [[../ifft|ifft]], [[../dct|dct]], [[../cepstrum|cepstrum]], [[../lpc|lpc]], [[../complex arithmetic|complex arithmetic]]


Discrete Fourier Transform.
[[../#Functions|<function list>]]
 
=====Usage:=====
 
<code>dft(<var>xr</var>, 0)</code>
 
<code>dft(<var>xr</var>)</code>
 
=====Function:=====
 
Forward DFT of the real signal <var>xr</var>. <code>nrow(xr)</code> must be even.
 
=====Result:=====
 
A complex spectrum with <code>nrow(xr)/2</code> complex elements (1st half).
 
=====Usage:=====
 
<code>dft(<var>xc</var>, 1)</code>
 
=====Function:=====
 
Forward DFT of the complex signal <var>xc</var>.
 
=====Result:=====
 
A complex spectrum of the same type as <var>xc</var>.
 
=====Usage:=====
 
<code>dft(<var>xc</var>, 2)</code>
 
=====Function:=====
 
Inverse DFT of the symmetrical complex spectrum.
 
=====Result:=====
 
A real signal with <code>nrow(xc)*2</code> elements.
 
=====Usage:=====
 
<code>dft(<var>xc</var>, 3)</code>
 
=====Function:=====
 
Inverse DFT of the complex spectrum <var>xc</var>.
 
=====Result:=====
 
A complex spectrum of the same type as <var>xc</var>.

Latest revision as of 09:14, 18 April 2018

Inverse or forward discrete fourier transform (dft).

Usage
dft(x {, type)
x
the data vector to be transformed
type
selects the data type of the argument and result and the transformation to be performed (default=0)
Result
A vector y containing the result of the transformation. The length and content of y depends on x and type.
type x nrow(x) y nrow(y) description
0 real signal with N samples N complex spectrum with N/2+1 values N+2 forward real→complex dft
note: only the first half (values: 0..N/2) of the conj. sym. complex spectrum is stored in y
1 complex signal with N samples 2N complex spectrum with N values 2N forward complex→complex dft
2 first half (values: 0..N/2) of a conj. sym. complex spectrum N+2 real signal with N samples N inverse complex→real dft
note: this is the inverse of type=0
3 complex spectrum with N values 2N complex signal with N samples 2N inverse complex→complex dft
See also
fft, ifft, dct, cepstrum, lpc, complex arithmetic

<function list>

Navigation menu

Personal tools