Fit a distribution line in a histogram on Matlab
问题 This is my code and the result I got. Something is not right — I used histfit(cntH,NumBins,'kernel') , and I was expecting the distribution line to start from zero and fit into the bars How can I fix that? clear all clc % yG = total load yH % specify number of bins and edges of those bins; this example evenly spaces bins NumBins = 100; BinEdges = linspace(0,35,70); % use histcounts and specify your bins cntH = histcounts(yH,'BinEdges',BinEdges); % plot figure(1); cla; hold on; % convert bin