# How to do normalize distribution technique on a simple matrix?

1 view (last 30 days)
Commented: Image Analyst on 2 Dec 2019
This is just a practice about normal distribution in MATLAB and not a real project.
I created a simple matrix and want to test normal distribution on it, it's
x=[1 2 3 4 5 6 7 8 9 10 11 12 13 16 18 20 800 801 802 803 810 850]';
After that I used 'distributionFitter' Toolbox in MATLAB and plot it and as you can see it has not a normal distribution: I was reading MATLAB help and found these codes:
pd = fitdist(x,'Normal');
%I change this code to have a same x_values vs x
x_values = linspace(min(x), max(x), size(x,1));
y = pdf(pd,x_values);
It works but I'm so confused about which variable is my final data? I mean I'm looking for a data who has been normal distribution?
If my codes are wrong how can I convert x to a matrix with normal distribution?

Image Analyst on 2 Dec 2019
Try this:
pd = fitdist(x, 'Normal')
% Get 1000 random numbers from this distribution:
r = pd.sigma * randn(1000) + pd.mu;
% View the histogram so we'll see that it has a normal shape.
histogram(r)
grid on;