Documentation for `iirEulerbw` (SPASS).

## Backward Euler scheme for IIR filters

### Description

The function `iirEulerbw` performs a IIR filtering using the backward Euler scheme to solve the state equation.

### Usage

```sig_out = iirEulerbw(sig_in,fsm)
```

### Arguments

 `sig_in` Input signal. Non Uniform signal. `fsm` Filter state matrix. Filter state matrix.

### Values

 `sig_out` Filtered output signal. Non Uniform signal.

• iir (IIR filter (generic function))
• iirbilinear (Bilinear scheme for IIR filters)
• iirEuler (Euler scheme for IIR filters)
• iirint0 (Integral scheme with zeroth order interpolation for IIR filters)
• iirint1 (Integral scheme with linear interpolation for IIR filters)
• iirintnn (Integral scheme with nearest neighbor interpolation for IIR filters)
• iirRK23 (Runge–Kutta23 scheme for IIR filters)
• iirRK4 (Runge–Kutta4 scheme for IIR filters)

### Example

```% Creation of a non uniform signal

f = 1;           % signal frequency
t = 10/f;        % signal duration
fs = 1000;       % sampling frequency
ts = 1/fs;       % sampling time
t0 = 1.;         % initial time
times = t0+(0:ts:t); % time samples
a = 0.45;        % signal amplitude

ampl = a*sin(2*pi*f*times)+a*sin(4*2*pi*f*times)+0.9;   % amplitudes

u = uinit(ampl,ts,t0);

% Level crossing

levels = [.1 .4 .7 1.1 1.4 1.7];
nu = levelcross(u,levels);

% Creation of a uniform filter

fc = 2;          % cut frequency
order = 10;      % filter order
wc = 2*pi*fc;    % cut pulsation

[A,B,C,D] = butter(order,wc,'s');
fsm = fsminit(A,B,C,D);

% FIR filtering

sig = iirEulerbw(nu,fsm);

% Plot result

figure(1)
plot(delay2time(nu.delay,nu.t0),nu.ampl,'k');
hold on
plot(delay2time(sig.delay,sig.t0),sig.ampl,'r');
hold off
```