Hi Seray,
As per my understanding of the question, I see that you have the boilerplate code to train and evaluate the neural network you’re using for 10 to 12 hidden layer sizes but are struggling to tabulate the outputs you’re getting.
In that case, I think adding these lines would help:
resultsTable = table('Size', [3, 3], 'VariableTypes', {'double', 'double', 'double'}, 'VariableNames', {'HiddenLayerNumber', 'MSEValue', 'RValue'});
This is to store the data in the table, and hence will be written before the loop is initiated.
resultsTable(i-9, :) = [hiddenLayerSize, performance, corr(t', y')];
This line indicates that we are adding the hiddenLayerSize (between 10 to 12), the performance metric calculated by you in the code (The MSE) and the correlation metric (the R Value) and adding them to the table.
Hence, this will be added inside the loop, and will be the last line when the MSE is already calculated using the call to the “perform” function.
I have attached the updated .m file as well, you can refer to that as well.
Hope this helps!