📄 d_v20_v40_v60_60cm_alfajenula.m
字号:
clc,clear, close all
d_v20_60cm_alfajenula_V123
d_v40_60cm_alfajenula_V123
d_v60_60cm_alfajenula_V123
d_v20_alfaje_30_V123
d_v40_alfaje_30_V123
d_v60_alfaje_30_V123
d_v20_alfaje_minus30_V123
d_v40_alfaje_minus30_V123
d_v60_alfaje_minus30_V123
%=========================================================================
%==========================================================================
d201_0 = d_v20_60cm_V1
d202_0 = d_v20_60cm_V2
d203_0 = d_v20_60cm_V3
d201_30 = d_v20_V1_30
d202_30 = d_v20_V2_30
d203_30 = d_v20_V3_30
d201_minus30 = d_v20_V1_minus30
d202_minus30 = d_v20_V2_minus30
d203_minus30 = d_v20_V3_minus30
%=========================================================================
%==========================================================================
d401_0 = d_v40_60cm_V1
d402_0 = d_v40_60cm_V2
d403_0 = d_v40_60cm_V3
d401_30 = d_v40_V1_30
d402_30 = d_v40_V2_30
d403_30 = d_v40_V3_30
d401_minus30 = d_v40_V1_minus30
d402_minus30 = d_v40_V2_minus30
d403_minus30 = d_v40_V3_minus30
%=========================================================================
%==========================================================================
d601_0 = d_v60_60cm_V1
d602_0 = d_v60_60cm_V2
d603_0 = d_v60_60cm_V3
d601_30 = d_v60_V1_30
d602_30 = d_v60_V2_30
d603_30 = d_v60_V3_30
d601_minus30 = d_v60_V1_minus30
d602_minus30 = d_v60_V2_minus30
d603_minus30 = d_v60_V3_minus30
%=========================================================================
%==========================================================================
figure(1),
subplot(3,3,1),plot(d201_0(:,[3 4])),title('d v20 V1 alfa nula')
subplot(3,3,2),plot(d203_0(:,[3 4])),title('d v20 V2 alfa nula')
subplot(3,3,3),plot(d202_0(:,[3 4])),title('d v20 V3 alfa nula')
subplot(3,3,4),plot(d201_30(:,[3 4])),title('d v20 V1 alfa 30')
subplot(3,3,5),plot(d203_30(:,[3 4])),title('d v20 V2 alfa 30')
subplot(3,3,6),plot(d202_30(:,[3 4])),title('d v20 V3 alfa 30')
subplot(3,3,7),plot(d201_minus30(:,[3 4])),title('d v20 V1 alfa -30')
subplot(3,3,8),plot(d203_minus30(:,[3 4])),title('d v20 V2 alfa -30')
subplot(3,3,9),plot(d202_minus30(:,[3 4])),title('d v20 V3 alfa -30')
figure(2),
subplot(3,3,1),plot(d401_0(:,[3 4])),title('d v40 V1 alfa nula')
subplot(3,3,2),plot(d403_0(:,[3 4])),title('d v40 V2 alfa nula')
subplot(3,3,3),plot(d402_0(:,[3 4])),title('d v40 V3 alfa nula')
subplot(3,3,4),plot(d401_30(:,[3 4])),title('d v40 V1 alfa 30')
subplot(3,3,5),plot(d403_30(:,[3 4])),title('d v40 V2 alfa 30')
subplot(3,3,6),plot(d402_30(:,[3 4])),title('d v40 V3 alfa 30')
subplot(3,3,7),plot(d401_minus30(:,[3 4])),title('d v40 V1 alfa -30')
subplot(3,3,8),plot(d403_minus30(:,[3 4])),title('d v40 V2 alfa -30')
subplot(3,3,9),plot(d402_minus30(:,[3 4])),title('d v40 V3 alfa -30')
figure(3),
subplot(3,3,1),plot(d601_0(:,[3 4])),title('d v60 V1 alfa nula')
subplot(3,3,2),plot(d603_0(:,[3 4])),title('d v60 V2 alfa nula')
subplot(3,3,3),plot(d602_0(:,[3 4])),title('d v60 V3 alfa nula')
subplot(3,3,4),plot(d601_30(:,[3 4])),title('d v60 V1 alfa 30')
subplot(3,3,5),plot(d603_30(:,[3 4])),title('d v60 V2 alfa 30')
subplot(3,3,6),plot(d602_30(:,[3 4])),title('d v60 V3 alfa 30')
subplot(3,3,7),plot(d601_minus30(:,[3 4])),title('d v60 V1 alfa -30')
subplot(3,3,8),plot(d603_minus30(:,[3 4])),title('d v60 V2 alfa -30')
subplot(3,3,9),plot(d602_minus30(:,[3 4])),title('d v60 V3 alfa -30')
% in = [d201]
% out = [d201(2:end,[3 4]);d201(end,[3 4])]
% i = in'; o = out';
% net= newff(i,o,[20 2])
% net.trainParam.epochs = 100;
% net.trainParam.goal = 0.001;
% net = train(net,i,o);
% translated first input vector
% x = [0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0]'
%
% y = sim(net,i)
% y1 = sim(net,[1 0 25 26])
d201_0 = d_v20_60cm_V1
d202_0 = d_v20_60cm_V2
d203_0 = d_v20_60cm_V3
d201_30 = d_v20_V1_30
d202_30 = d_v20_V2_30
d203_30 = d_v20_V3_30
d201_minus30 = d_v20_V1_minus30
d202_minus30 = d_v20_V2_minus30
d203_minus30 = d_v20_V3_minus30
P = [d201_0; d201_30; d201_minus30]'
% ostala merenja ostavljamo za test i verifikaciju rezultata
t1 = size([d201_0],1)
t2 = size([d201_30],1)
t3= size([d201_minus30],1)
cl1 = [ones(1,t1)*1] % 0
cl2 = [ones(1,t2)*2] % 30
cl3 = [ones(1,t3)*3] % -30
Tc = [cl1 cl2 cl3]
T = ind2vec(Tc);
targets = full(T)
netc = newlvq(minmax(P),20,[.34 .33 .33])
% net.IW{1,1}
% Y = sim(net,P);
% Yc = vec2ind(Y)
netc.trainParam.epochs = 20;
netc.trainParam.show = 50;
netc.trainParam.lr = 0.05;
netc.trainParam.goal = 1e-5;
netc.trainParam.max_fail = 5;
%
netc = train(netc,P,T)
Y = sim(netc,P);
Yc = vec2ind(Y)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -