histogram function not working

조회 수: 10 (최근 30일)
Gabs
Gabs 2015년 10월 6일
댓글: Steven Lord 2015년 10월 6일
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') >>

채택된 답변

the cyclist
the cyclist 2015년 10월 6일
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
Gabs
Gabs 2015년 10월 6일
I got this to work
data = 2*randn(5000,1) + 5
hist(data)
Thank you
Steven Lord
Steven Lord 2015년 10월 6일
At the bottom of the online documentation page for HISTOGRAM it says "Introduced in R2014b".

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by