MATLAB: Where in documentation does it say that fitnet([]) gives a linear model

fitnet

I have seen Greg Heath's posts such as this one in which fitnet([]) is used to fit a linear model, i.e. with no hidden layers. But I can't find a reference in the fitnet documentation that this is the expected result of [] as an input, and I find this hard to spot in the fitnet.m code. Can someone please point me to a description in the documentation of the expected behavior of fitnet([])? I just want to understand this better.

Best Answer

fitnet(H) yields H nodes in the hidden layer
A linear function needs no hidden layer
I could only think of 2 possibilities
a. net1 = fitnet(0), view(net1)
b. net2 = fitnet([]), view(net2)
So, as I did, try them out and see what happens.
Not sure if I checked the documentation.
Since I don't have MATLAB on this computer I can't check.
Also can't remember what happens when you try fitnet(0).
Hope this helps.
Greg