I want to create a matrix where the R (subtracted) matrix is stored in C matrix such that all 9 R(i,j) elements produced from 10 images get stored in first column of matrix c, then next R(i,j) be stored in 2nd column of matrix c and so on.
Here x is row no.
and y is column no.
use whatever image you like with 400X400 pixels
image1 = double(imread(sprintf('image_%.4d.jpg',k)));
image2 = double(imread(sprintf('image_%.4d.tiff',k+1)));