When creating a pattern/mask for single-pixel imaging of a picture, I use a different delta function for each measurement, and this is all done withing a for loop as follows:
img = double(im2gray(picture))
for i = 1:n^2
delta = zeros(n,n);
delta(i) = 1;
A = real(ifft2(delta))
B(i) = sum(img.*A, 'All');
How do I keep track of where each measurement comes from. ie, which delta function corresponds to a measurement .
The code is intended to be applied to the use of PCA to the data (which I am still uncertain as how to do) to decrease the number of measurements needed to analyse an image.