Develop an ANN model getting concatenation erro help
2 ビュー (過去 30 日間)
古いコメントを表示
Vidhyashankar V
2020 年 8 月 21 日
コメント済み: Vidhyashankar V
2020 年 8 月 26 日
fileName = '2017-07.xlsx';
sheetName = 'Sheet1' ;
G_T=xlsread(fileName, sheetName , 'B3:B39999');
M=xlsread(fileName, sheetName , 'AO3:AO39999');
D=xlsread(fileName, sheetName , 'AN3:AN39999');
H=xlsread(fileName, sheetName , 'A3:A39999');
G_T_Test=xlsread(fileName, sheetName , 'B40000:B44641');
M_Test=xlsread(fileName, sheetName , 'AO40000:AO44641');
D_Test=xlsread(fileName, sheetName , 'AN40000:AN44641');
H_Test=xlsread(fileName, sheetName , 'A40000:A44641');
%------------
inputs = [M,D,H];
I=inputs;
targets= [G_T];
T=targets;
%-------ann Model development and training
net = newff(I,T,5);
Y = sim(net,I);
net.trainParam.epochs = 100;
net = train(net,I,T);
%------------testing the developed model--------
test=[M_Test,D_Test,H_Test];
Test1=test;
G_Mi = sim(net,Test1);
G_M= G_Mi;
%-------------------
G_Tp=[ ];
for i=1:1:length(G_M)
G_Tp=[G_Tp ; G_M(i,2)];
end
G_Tp;
plot (G_T_Test)
hold on
plot(G_Tp,'red')
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
I dont know where, help. Thanks in advance
0 件のコメント
採用された回答
Devineni Aslesha
2020 年 8 月 26 日
Assuming that the error 'Dimensions of arrays being concatenated are not consistent' is in the line inputs = [M,D,H] or test =[M_Test,D_Test,H_Test]; is due to that the matrices that are concatenated do not have the same number of rows.
For more information on concatenating matrices, refer the following link.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!