I am trying to write a custom aggregation function to use in matlab. what i have so far is:
function y = choquet(x)
x=sort(x);
m=[1 0.65 0.4];
for i=1
y(i)=(x(i))*m(i);
end
for i=2:numel(x)
y(i)=(x(i)-x(i-1))*m(i);
end
end
which appears to follow the guidelines on matlab's website, but it isn't working as a aggregation function in my fis. (it works in the command line with the proper input). what am i doing wrong? (only playing around at this point with x a vector of 3 elements).