Академический Документы
Профессиональный Документы
Культура Документы
%to make sure that the no of the arguments and the nature of the arguments
%is compatible to the NNT ver > 5.0 for the jordan_p1
v1 = varargin{1};
v2 = varargin{2};
nntobsu(mfilename,['See help for ' upper(mfilename) ' to update calls to the new argument list.']);
net = jordan_p0(varargin{:});
else
net = jordan_p1(varargin{:});
end
%==========================================================
%this portion of the code is the main part with designing the Architecture,
% Defaults
% Format
% Error checking
if (~isa(p,'double')) || ~isreal(p)
end
if isa(s,'cell')
if (size(s,1) ~= 1)
end
for i=1:length(s)
si = s{i};
end
end
s = cell2mat(s);
end
end
% Architecture
Nl = length(s)+1; %N-1 hidden + 1 output to decide the no of layers for the network
net.biasConnect = ones(Nl,1);
net.inputConnect(1,1) = 1;
[j,i] = meshgrid(1:Nl,1:Nl);
net.outputConnect(Nl) = 1;
% Simulation
net.inputs{1}.exampleInput = p;
for i=1:Nl
if (i<Nl)
net.layerWeights{i,i+1}.delays = 1;
else
net.layerWeights{Nl,Nl}.delays = 1 ;
end
if (i<Nl)
net.layers{i}.transferFcn = 'tansig';
else
net.layers{i}.transferFcn = 'purelin';
end
else
net.layers{i}.transferFcn = tf{i};
end
end
net.outputs{Nl}.exampleOutput = t;
net.outputs{Nl}.processFcns = tpf;
% Adaption
net.adaptfcn = 'trains';
net.inputWeights{1,1}.learnFcn = blf;
for i=1:Nl
net.biases{i}.learnFcn = blf;
net.layerWeights{i,:}.learnFcn = blf;
end