function NieTanDV = NieTan(simpleT2FS);

% function NieTanDV = NieTan(simpleT2FS);
% applied the Nie-Tan method to the simple T2FS
% (forward) direction
%
% SG 240209

matrixSize = size(simpleT2FS);
length = matrixSize(2);
x = 0:1/(length-1):1;

L = simpleT2FS(1,:);
U = simpleT2FS(2,:);

NT = (L+U)*0.5;

DV = defuzz(x,NT,'centroid');

fprintf('Slices: %0.0f \t\t', length);
fprintf('Defuzzified value: %0.10f \n', DV);
