Professional Documents
Culture Documents
%#ok<*RPMT0>
% Input 1
x1_step1.xoffset = 0;
x1_step1.gain = 0.200475452649894;
x1_step1.ymin = -1;
% Layer 1
b1 = [-12.478281009395722378;-6.183720938443127757;-
2.8001239599998628549;5.3693620946624278645;-2.0421611931976917376;-
0.61769548950059083303;-
2.2652232539557566326;4.2527504592623524005;2.8858325569702247826;5.494687562586938
6894];
IW1_1 = [13.683454635072148875;7.6536996446519838244;6.1168934938922578937;-
9.4228981603957659985;9.9251743618830374771;5.9602168281978560316;-
3.7504757681953457826;6.0389915573919035197;2.7912314138770191185;6.865301302291813
4567];
% Layer 2
b2 = -1.3017170912792885851;
LW2_1 = [0.12447330008772908294 0.54788547803440212913 -0.90067186917700614579
0.16547519957393433399 0.04473379733052040147 0.18810481882810739518
0.90218140470242169648 -0.07486070402850399097 2.5274365608027880015
-0.030588784244461052902];
% Output 1
y1_step1.ymin = -1;
y1_step1.gain = 0.2;
y1_step1.xoffset = 0;
% Dimensions
TS = size(X,2); % timesteps
if ~isempty(X)
Q = size(X{1},2); % samples/series
else
Q = 0;
end
% Allocate Outputs
Y = cell(1,TS);
% Time loop
for ts=1:TS
% Input 1
Xp1 = mapminmax_apply(X{1,ts},x1_step1);
% Layer 1
a1 = tansig_apply(repmat(b1,1,Q) + IW1_1*Xp1);
% Layer 2
a2 = repmat(b2,1,Q) + LW2_1*a1;
% Output 1
Y{1,ts} = mapminmax_reverse(a2,y1_step1);
end