MATLAB: Histogram decimal value error

histogram

Undefined function 'histogram' for input arguments of type 'double', in this code x = randn(1000,1); nbins = 25; h = histogram(x,nbins)

Best Answer

The histogram function was introduced in R2014b. If you’re using an earlier version, use hist (or one of its friends).