I use Simple Random Sampling and Latin Hypercube Sampling in order to find the differences between the 2 methods as we calculate the variable for 1 pixel of an image and see the differences for the 2 methods of the Means and Variances. The number of Iterations is 1000 and the number of Samples (N) is [10 30 50 100].Does anyone knows how can i make the same for 2 pixels or more at the same code?
A sample of my code is (where 'uniform' is for LH and 'random' for SR):
m = 0; % zero mean
s = 1; % unit standard deviation
Fx = (0.001:0.001:0.999)'; % discretize probability axis
N = 10 % sample size
seedNum = 34567; % random number generator
rng(seedNum); % set random number seed
nIter = 1000 % number of iterations or repetitions of sampling
xSR10 = lhsunivar('normal',N,'random',nIter,m,s);
disp(xSR10)
MeanxSR10 = mean(xSR10);
disp (MeanxSR10);
xLH10 = lhsunivar('normal',N,'uniform',nIter,m,s);
disp (xLH10);
MeanxLH10 = mean(xLH10);
disp (MeanxLH10);