필터 지우기
필터 지우기

how to define interval and get frequency ?

조회 수: 2 (최근 30일)
farfar
farfar 2017년 1월 28일
댓글: Walter Roberson 2017년 1월 28일
hi I have a matrix for ex: [3 5 6;5 7 9;8 3 8;6 5 3]. I want to define six interval with the weight of 1 (9-3=6/6) to have :(3,4) (4,5) (5,6) (6,7) (7,8) (8,9) (how to add up like this ?) and then find the frequency of numbers in intervals. for example it gives me in interval (3 4) frequency is 3. the actual matrix is much bigger thou. Thanks every one!

답변 (1개)

Walter Roberson
Walter Roberson 2017년 1월 28일
See histogram(). If you are using an older release you might need hist() or histc()
  댓글 수: 2
farfar
farfar 2017년 1월 28일
I was trying to use hist but it did not give me any histogram chart. also I need to see frequency and put them on a table. I dont know how to do that with hist(). would you please give some more details?
Walter Roberson
Walter Roberson 2017년 1월 28일
A = [3 5 6;5 7 9;8 3 8;6 5 3];
hist(A(:), 6)

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

카테고리

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