fastmode

Optimized high speed version of statistical mode, i.e. element(s) occuring at greatest frequency

이 제출물을 팔로우합니다

fastmode is an improvement on 'mode.m' by Michael Robbins (File ID 5266). It ignores NaN's and properly returns multiple results if more than one element occurs at equal frequency.

M-file profiler revealed extracting unique values took 50% of the time spent in the function, and since a list of unique values were not required, a work-around has been used that makes this even faster than the first submission (25 seconds to process a 100,000 element vector iterated 1,000 times, versus original 27 seconds and Robbins' hist-based version of 69 seconds).

The function is rather robust in that it can handle even single-element vectors, but it will generate an error if you attempt to call it with an empty vector. Since it's designed for speed, no error checking is performed on the input.

인용 양식

Harold Bien (2026). fastmode (https://kr.mathworks.com/matlabcentral/fileexchange/10745-fastmode), MATLAB Central File Exchange. 검색 날짜: .

도움

도움 받은 파일: mode

도움 준 파일: mode calculator, MatEx - Matlab extremes

카테고리

Help CenterMATLAB Answers에서 Direct Search에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.0.0.0