Home Reference Source
public class | source

Signal

Signal processing class for Matrix class.

  • These methods can be used in the Matrix method chain.
  • This class cannot be called directly.

Static Method Summary

Static Public Methods
public static

Convolution integral, Polynomial multiplication.

public static

Discrete cosine transform (DCT-II, DCT).

public static

Discrete two-dimensional cosine transform (2D DCT).

public static

Discrete Fourier transform (DFT).

public static

Discrete two-dimensional Fourier transform (2D DFT).

public static

FFT shift.

public static

Hamming window.

public static

hann(size: KMatrixInputData, periodic: string | number): Matrix

Hann (Hanning) window.

public static

Inverse discrete cosine transform (DCT-III, IDCT),

public static

Inverse discrete two-dimensional cosine transform (2D IDCT),

public static

Inverse discrete Fourier transform (IDFT),

public static

Inverse discrete two-dimensional Fourier transform (2D IDFT),

public static

Power spectral density.

public static

window(name: string, size: KMatrixInputData, periodic: string | number): Matrix

Create window function for signal processing.

public static

ACF(Autocorrelation function), cros-correlation function.

Static Public Methods

public static conv(x1: KMatrixInputData, x2: KMatrixInputData): Matrix source

Convolution integral, Polynomial multiplication.

Params:

NameTypeAttributeDescription
x1 KMatrixInputData
x2 KMatrixInputData

Return:

Matrix

public static dct(x: KMatrixInputData, type: KSignalSettings): Matrix source

Discrete cosine transform (DCT-II, DCT).

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KSignalSettings
  • optional

Return:

Matrix

dct(x)

public static dct2(x: KMatrixInputData): Matrix source

Discrete two-dimensional cosine transform (2D DCT).

Params:

NameTypeAttributeDescription
x KMatrixInputData

Return:

Matrix

public static fft(x: KMatrixInputData, type: KSignalSettings): Matrix source

Discrete Fourier transform (DFT).

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KSignalSettings
  • optional

Return:

Matrix

fft(x)

public static fft2(x: KMatrixInputData): Matrix source

Discrete two-dimensional Fourier transform (2D DFT).

Params:

NameTypeAttributeDescription
x KMatrixInputData

Return:

Matrix

public static fftshift(x: KMatrixInputData, type: KSignalSettings): Matrix source

FFT shift. Circular shift beginning at the center of the signal.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KSignalSettings
  • optional

Return:

Matrix

public static hamming(size: KMatrixInputData, periodic: string | number): Matrix source

Hamming window.

Params:

NameTypeAttributeDescription
size KMatrixInputData

Window length

periodic string | number
  • optional
  • default: "symmetric"

0/"symmetric" (default) , 1/"periodic"

Return:

Matrix

Column vector.

public static hann(size: KMatrixInputData, periodic: string | number): Matrix source

Hann (Hanning) window.

Params:

NameTypeAttributeDescription
size KMatrixInputData

Window length

periodic string | number
  • optional
  • default: "symmetric"

0/"symmetric" (default) , 1/"periodic"

Return:

Matrix

Column vector.

public static idct(X: KMatrixInputData, type: KSignalSettings): Matrix source

Inverse discrete cosine transform (DCT-III, IDCT),

Params:

NameTypeAttributeDescription
X KMatrixInputData
type KSignalSettings
  • optional

Return:

Matrix

idct(x)

public static idct2(X: KMatrixInputData): Matrix source

Inverse discrete two-dimensional cosine transform (2D IDCT),

Params:

NameTypeAttributeDescription
X KMatrixInputData

Return:

Matrix

public static ifft(X: KMatrixInputData, type: KSignalSettings): Matrix source

Inverse discrete Fourier transform (IDFT),

Params:

NameTypeAttributeDescription
X KMatrixInputData
type KSignalSettings
  • optional

Return:

Matrix

ifft(X)

public static ifft2(X: KMatrixInputData): Matrix source

Inverse discrete two-dimensional Fourier transform (2D IDFT),

Params:

NameTypeAttributeDescription
X KMatrixInputData

Return:

Matrix

public static powerfft(x: KMatrixInputData, type: KSignalSettings): Matrix source

Power spectral density.

Params:

NameTypeAttributeDescription
x KMatrixInputData
type KSignalSettings
  • optional

Return:

Matrix

abs(fft(x)).^2

public static window(name: string, size: KMatrixInputData, periodic: string | number): Matrix source

Create window function for signal processing. The following window functions are available.

  • "rectangle": Rectangular window
  • "hann": Hann/Hanning window.
  • "hamming": Hamming window.
  • "blackman": Blackman window.
  • "blackmanharris": Blackman-Harris window.
  • "blackmannuttall": Blackman-Nuttall window.
  • "flattop": Flat top window.
  • "sin", Half cycle sine window.
  • "vorbis", Vorbis window.

Params:

NameTypeAttributeDescription
name string

Window function name.

size KMatrixInputData

Window length

periodic string | number
  • optional
  • default: "symmetric"

0/"symmetric" (default) , 1/"periodic"

Return:

Matrix

Column vector.

public static xcorr(x1: KMatrixInputData, x2: KMatrixInputData): Matrix source

ACF(Autocorrelation function), cros-correlation function.

  • If the argument is omitted, it is calculated by the autocorrelation function.

Params:

NameTypeAttributeDescription
x1 KMatrixInputData
x2 KMatrixInputData
  • optional

Matrix to calculate the correlation.

Return:

Matrix