if you want the ANN with two hidden layer, you can use this in your mfile
hiddenLayerSize = [n m];
% n is the number of neuron in fist hidden layer
% m is the number of neuron in second hidden layer
net = feedforwarnet(hiddenLayerSize);
I hope it will help you.
How to create more than one hidden layers in ANN using MATLAB?. Available from: https://www.researchgate.net/post/How_to_create_more_than_one_hidden_layers_in_ANN_using_MATLAB [accessed May 18, 2017].
newff(P,T,S) takes, P - RxQ1 matrix of Q1 representative R-element input vectors. T - SNxQ2 matrix of Q2 representative SN-element target vectors. Si - Sizes of N-1 hidden layers, S1 to S(N-1), default = []. (Output layer size SN is determined from T.) and returns an N layer feed-forward backprop network. newff(P,T,S,TF,BTF,BLF,PF,IPF,OPF,DDF) takes optional inputs, TFi - Transfer function of ith layer. Default is 'tansig' for hidden layers, and 'purelin' for output layer. BTF - Backprop network training function, default = 'trainlm'. BLF - Backprop weight/bias learning function, default = 'learngdm'. PF - Performance function, default = 'mse'. IPF - Row cell array of input processing functions. Default is {'fixunknowns','remconstantrows','mapminmax'}. OPF - Row cell array of output processing functions. Default is {'remconstantrows','mapminmax'}. DDF - Data division function, default = 'dividerand'; and returns an N layer feed-forward backprop network.