MATLAB: Not train neural network newff

Deep Learning Toolboxnewffnntrain neural network

Dear all,
I have this code for training neural network (type newff) and MATLAB is almost all day busy, but nothing happens (no training newff). Does anyone know, where is the mistake?
load ('trenovaci_modely2_stredni')
D = [stredni_tvar{1,:}];
F = [stredni_tvar{2,:}];
net_stredni_MLP = newff(D,F,20);
net.trainparam.epochs = 100;
net = train(net_stredni_MLP,D,F);
D = stredni_tvar{1,7};
J = sim(net_stredni_MLP,D);
save net_stredni_MLP
disp('Neuronová síť byla uložena')
Thank you for your answers.

Best Answer

load ('trenovaci_modely2_stredni')
D = [stredni_tvar{1,:}];
F = [stredni_tvar{2,:}];
[ I N ] = size(D) % = ?

[ O N ] = size(F) % = ?
net_stredni_MLP = newff(D,F,20);
net.trainparam.epochs = 100;
net = train(net_stredni_MLP,D,F);
% The trained model is net, NOT net_stredni_MLP!
% D = stredni_tvar{1,7}; DELETE
D7 = D(1,7) % WHY JUST ONE POINT??
% J = sim(net_stredni_MLP,D); DELETE
% save net_stredni_MLP DELETE
J7 = sim( net, D7); % Only 1 point
J = sim( net, D ); % N points
save net
disp('Neuronová síť byla uložena')
Hope this helps.
Thank you for formally accepting my answer
Greg