histogram function not working

I am trying to use the histogram function, and even the basic MathWorks demonstration does not work in my Matlab
x = 2*randn(5000,1) + 5;
histogram(x,'Normalization','pdf')
I get the following mistake: Undefined function 'histogram' for input arguments of type 'double'.
Error in TEST2 (line 2) histogram(x,'Normalization','pdf') >>

 Respuesta aceptada

the cyclist
the cyclist el 6 de Oct. de 2015
Those commands produce a histogram for me (R2015b). The histogram command is relatively new, introduced a couple versions ago. Do you have an older version? What do the commands
which histogram
and
doc histogram
do for you?

3 comentarios

Gabs
Gabs el 6 de Oct. de 2015
yes I have r2013a.
which histogram gives me: 'histogram' not found.
and doc histogram tells me it is y = hist(u,n)
Gabs
Gabs el 6 de Oct. de 2015
I got this to work
data = 2*randn(5000,1) + 5
hist(data)
Thank you
Steven Lord
Steven Lord el 6 de Oct. de 2015
At the bottom of the online documentation page for HISTOGRAM it says "Introduced in R2014b".

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Preguntada:

el 6 de Oct. de 2015

Comentada:

el 6 de Oct. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by