MATLAB: Save paired values from a FOR loop

I have the following FOR loop
I = imread('image.png')
for i = 2:1:5
init = ones(i)
[J,PSF] = deconvblind(I,init)
end
and I would like to save all the [J,PSF] pairs.
I tried using
for i = 2:1:5
init = ones(i)
[J,PSF] = deconvblind(I,init)
[X(i),Y(i)] = [J,PSF]
end
but I got the " Dimensions of matrices being concatenated are not consistent. " error.
Could, anyone, please, give me a hint on how to solve this?

Best Answer

You could save them in cell arrays:
X{i} = J;
Y{i} = PSF;
or in a single cell array with two rows:
X{1, i} = J;
X{2, i} = PSF;
Related Question