필터 지우기
필터 지우기

highest frequency

조회 수: 6 (최근 30일)
joseph Frank
joseph Frank 2011년 7월 2일
Hi,
is there a matlab function that computes the highest frequency of occurences? for example: A=[3423 3420 3423 3421 3423 3523 3524 3545 3644 3999]; how can i get as an answer 3423 since it occurs the most?

채택된 답변

Rick Rosson
Rick Rosson 2011년 7월 2일
Please try the mode function:
x = mode(A);
HTH.

추가 답변 (1개)

Oleg Komarov
Oleg Komarov 2011년 7월 2일
A = [3423 3420 3423 3421 3423 3523 3524 3545 3644 3999];
unA = unique(A);
counts = histc(A,unA);
[m,idx] = max(counts);
unA(idx)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by