I'm developing an app in which I need to store matrix in an array within a loop, something like this:
MatTable=[];
for i=1:n
Mat=binarisation(Images(i,:)); %binarisation returns a matrix (binary image)
MatTable=[MatTable, Mat];
end
There is no error during execution of this code, but the result is not correct, I tried to display the content of MatTable using: display(MatTable(i));and the result is always: ans=1;
I guess this isn't the right way to store matrix in an array within a loop, so what is the correct way to realise it?