clc close all; clear all; n=0+(10*randn(400)); nn=imcrop(n,[0 0 16 16]); std(nn(:))
I generate noise '0+10*randn' function,then i found std(:) of noisy image but problem is that when i run matlab code using F5 in matlab,every time std(:) is different(above code) 9.5163,10.5658,9.5044,9.40,10.41
so my question is that which value should taken of std(nn(:)) of above code.
generates a random 400*400 matrix every time. Hence the random result. Are you not expecting this ?
It is not clear, what "one particular value" could be, when you add random noise. When you want to initialize the random number generator, such that RAND replies the same values in each run:
s = RandStream.create('mt19937ar', 'seed', 5489); RandStream.setDefaultStream(s);
This is explained in the documentation, see doc rand.