1. histogram Rendering
Matrix = yours;
H = Hist (matrix (:), 256 );
Horz = min (matrix (:)) :( max (matrix (:))-min (matrix (:))/255: max (matrix (:));
Bar (horz, H );
Draw the Laplace Distribution and Gaussian distribution:
X =-10:0. 05:10;
Y = 1/SQRT (2)/1 * exp (-SQRT (2)/1 * ABS (x); % Laplace
Y2 = 1/SQRT (2 * PI) * exp (-X. * X/2); % Gaussian
Plot (x, y );
Plot (x, Y2 );
First obtain the Laplace Distribution chart:
Then, we obtain the Gaussian distribution chart:
2. re-arrange the vectors into an image (note that the Left mentioned below actually retrieves data from each column in the right column, which may be different from the memory mode in other languages)
We know that this code will generate a vector: (right is 512*512 matrix)
Left = right (:);
So how can we convert left into two-dimensional image output?
Experiment:
Tmptry = right; % Give tmptry a template to let him know at least what kind of profile he should look like
Tmptry (:) = left;
Imshow (tmptry, []); % congratulations! You are good man!
I didn't expect it to succeed. MATLAB is really so powerful, haha.
However, such Code cannot be successful (OPPs !) :
Tmptry [];
For xi = 1: 1: size (right, 1)
Tmptry = [tmptry; left (XI: size (right, 1): End)];
End
MATLAB note [ing]