function o=my_DNM(Ino,Hno,Ono,W,B,x)
global K;
global QS;

%Train a Dendritic Neuron Model
% x为输入，可以一下子处理多行输入
%例如 输入为3个元素，训练数据总共7组，则x为
% 1 1 1
% 1 1 1
% 1 1 1
% 1 1 1
% 1 1 1
% 1 1 1
% 1 1 1
%输出为o 对应可以一次输出七个结果
P=x';
[I,J]=size(P); % J is the dimension number of sample; I is the number of sample.In evolutation training, the I is one;
w=reshape(W,I,Hno);
q=reshape(B,I,Hno);
M=Hno;
% k = K;
% qs = QS;

k=25;
qs=0.9;
Y=zeros(I,M,J);
Z=ones(M,J);
V=zeros(1,J);
O=zeros(1,J);
Q=zeros(1,J);

for j=1:J
    for m=1:M
        for i=1:I
            Y(i,m,j)=1/(1+exp(-k*(w(i,m)*P(i,j)-q(i,m))));
        end
    end
    % build a AND layer
    for m=1:M
        Q=1;
        for i=1:I
            Q=Q*Y(i,m,j);
        end
        Z(m,j)=Q;
    end
    % build a OR layer
    V=sum(Z);
    % build a soma layer
    O(j)=1/(1+exp(-k*(V(j)-qs)));
end
o=O;
end



