MATLAB: Can patternnet have no hidden layers

hidden layerneural network

Can patternnet or feedforwardnet have no hidden layers? The documentation says the first argument should be a "Row vector containing one or more hidden layers". What if I want no hidden layers at all?

Best Answer

net = patternnet([]);
Similarly for all other net creation functions.
Hope this helps.
Thank you for formally accepting my answer
Greg