MATLAB: How to define a matrix to store answers with increment

matrixmatrix arraynumerical differentiation

After calculating the answer , I need to store the answers inside a matrix.
How can I store answers with specific formula and increment into a matrix ?