MATLAB: Fail to insert a dataset into an array.The array keeps showing that the dataset is an undefined function or variable

arrayDeep Learning Toolboxmatrix arrayneural network

Hey,
I am trying to insert a default build-in dataset into a feed-forward neural network. I followed the instructions and typed
load simplefit_dataset ;
[NNInputs, NNTargets] = simplefit_dataset ;
into the Command. It used to train and display the neural network window, but now just by inserting the dataset into the array, it keeps showing the error:
??? Undefined function or variable 'simplefit_dataset'.
And if I change "simplefit_dataset" to "[0, 0]" i.e.
[NNInputs NNTargets] = simplefit_dataset ;
or the other way
[NNInputs NNTargets] = [0 0] ;
I get the error:
??? Too many output arguments.
What a trivial yet unprecedented problem which keeps annoying me for hours. Thanks in advance !

Best Answer

We don't know what got loaded. Try this:
s=load('simplefit_dataset.mat') % or whatever the actual filename of the .mat file is.
fields(s) % No semicolon to display fields into command window.
Tell us what you see.
Maybe you want
[NNInputs, NNTargets] = size(simplefit_dataset);
or
NNInputs = simplefit_dataset.NNInputs;
NNTargets = simplefit_dataset.NNTargets;
I'm not really sure until I see what you loaded and how you plan on using simplefit_dataset, NNInputs and NNTargets.