FUNCTION REFERENCE
histfit
Histogram with a fitted distribution curve.
Histogram with a fitted distribution curve.
Syntax
histfit(data)Syntax
histfit(data, nbins)Syntax
h = histfit(data, nbins, dist)Draws a histogram of data with nbins bins (default ceil(sqrt(n))) and the density of the distribution fitted by fitdist (default 'normal'), scaled to the bar heights by n times the bin width. NaN values are ignored. h holds the bar handles followed by the line handle.
Example
rng(0); h = histfit(randn(100,1) + 5, 10);Differences from MATLAB: Uses equal-width bins between the data minimum and maximum; kernel fits are not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.