%% Fuzzy_Paper Implementation : 
%  IEEE TRANSACTIONS ON FUZZY SYSTEMS, VOL. 20, NO. 4, AUGUST 2012
%  ---------------------------------------------------------------
%  Compute Firing Strength :

function [FirStrDrvtC, FirStrDrvtSig, mu] = firingStrngthDrvt(X, C, Sig)

    mu = zeros(1, numel(X));
    FirStrDrvtC = zeros(1, numel(X));
    FirStrDrvtSig = zeros(1, numel(X));
    for p = 1:numel(X)
        mu(p) = exp(-(X(p) - C(p))^2/Sig(p)^2);
        FirStrDrvtC(p) = 2*(X(p) - C(p))/Sig(p)^2; 
        FirStrDrvtSig(p) = -2*(X(p) - C(p))^2/Sig(p)^3; 
    end
%     FirStr = prod(mu);
%     FirStrDrvtC = FirStr * FirStrDrvtC;
%     FirStrDrvtSig = FirStr * FirStrDrvtSig;
end


