<< digitrevorder | FOSSEE_Signal_Processing_Toolbox | downsample >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > diric

# diric

Calculates the dirichlet function

### Syntax

    y = diric(x, n)

### Parameters

x:

  Real valued vector or matrix

n:

  Real positive integer or complex integer

y:

  Dirichlet function values.

### Description

This function computes the Dirichlet function values for the input array `x` and number of harmonics `n`.

### Examples

    f = linspace(-%pi, %pi, 100)  // frequency range
    y = diric(f, 7)

    plot(f, y)
    xtitle("Dirichlet Function - Frequency Response of 7-Harmonic Pulse Train", "Frequency (rad)", "Amplitude")

Report an issue
<< digitrevorder | FOSSEE_Signal_Processing_Toolbox | downsample >>