In this tutorial, we demonstrate the set-valued fuzzy integral via the non-direct fuzzy integral (NDFI), which as put forth initally for forensic anthropology (skeletal age-at-death estimation). The NDFI is a way to extend the FI to set-valued integrands (the sets can be non-convex and sub-normal). It does NOT follow the extension principle. We do not provide custom slides for this tutorial. If the reader would like to learn more, two related articles include "D. T. Anderson, T. C. Havens, C. Wagner, J. M. Keller, M. F. Anderson, D. J. Wescott, Extension of the Fuzzy Integral for General Fuzzy Set-Valued Information, IEEE Transactions on Fuzzy Systems, 2014" and "D. T. Anderson, P. Elmore, F. Petry, T. Havens, "Fuzzy Choquet Integration of Homogeneous Possibility and Probability Distributions," Information Sciences, 2016".

First, clear your path and figures.

```
``````
close all;
clear all;
```

Next, create a random input. It is N inputs by discretization level D (on our X domain). For example, for N=2 we have two inputs and possibly input one had 0.1/x1, 0.2/x2, ..., 1/xD.

```
``````
% setup inputs (random)
N = 3; % number of inputs
D = 20; % discretization
inputs = rand(N,D);
```

Next, create the binary encoded fuzzy measure (average).

```
``````
% make up the binary encoded fuzzy measure
FM = fi_owa( ones(1,N) ./ N )';
```

Next, call the interval-valued FI.

```
``````
% which integral
whichintegral = 1;
% do we want to plot?
plotit = 1;
% run the integral
[ FIresult ] = fi_ndfi( inputs , FM , whichintegral , plotit )
```

Where NDFI discretizes the domain (aka x-axis) or a discrete domain is passed in (the latter is what we supported).

```
``````
function [ FIresult ] = fi_ndfi( inputs , FMbinary , whichintegral )
% how many inputs and what is the number (N) of discrete elements (D)
[N D] = size( inputs );
% compute the FI at each element in D
FIresult = zeros( 1 , D );
for i=1:D
if( whichintegral == 0 ) %sugeno
FIresult(i) = fi_sugeno_integral_h_and_g_form( inputs(:,i)' , FMbinary );
else %choquet
FIresult(i) = fi_choquet_integral_h_and_g_form( inputs(:,i)' , FMbinary );
end
end
end
```

Example output is as follows. Note, I shaded the result and overlaid the inputs to try to make them easier to view.