I have a column of data containing the study year of the sampling stations:
1950
1953
1953
1953
1957
1957
1959
1959
1959
1959
...
I want to plot something like histogram myself.
How do I get a two column data, with the left column containing all the possible years, and the right column containing their frequencies?
1950, 1
1953, 3
1957, 2
1959, 4
Thanks.

 채택된 답변

Amit
Amit 2014년 1월 21일

0 개 추천

table = tabulate(A); % where A is your data
% if you want exactly the way you said
table(:,3) = [];

댓글 수: 1

Leon
Leon 2014년 1월 21일
This is exactly what I am looking for!
Thank you very much.

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

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Histograms에 대해 자세히 알아보기

태그

질문:

2014년 1월 21일

댓글:

2014년 1월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by