I have a matrix called 'ResultMtx'. its size is
I try to do Preallocation of the matrix by writing:
ResultMtx = zeros(792,5);
Then later in my program I calculate values for the matrix and define it like this:
ResultMtx = [ResultMtx; m, o, r, t, Diff_irr];
ResultMtx = [ResultMtx; nan nan nan nan nan];
But then the result of my matrix is all zeros. what am i doing wrong?