Maybe the problem is that you have created too many bins; one bin for each observation. That would not yield good results. Consider lowering the number of bins.
In addition, x is your data and NOT the frequency. You can use the histcounts() function to get the desired bins.