I think you are on the wrong track.
Typically all you know are the N pairs of I-dimensional inputs and corresponding O-dimensional output targets in the form
[ I N ] = size(input)
[ O N ] = size(target)
From there you can go to the documentation examples resulting from the commands
help fitnet
and
doc fitnet
for regression and curvefitting
or
help patternnet
and
doc patternnet
for classification and pattern-recognition.
Try the MATLAB data in the examples before trying your own.
Hope this helps.
Greg