How to count the frequency of repeated values in an array of values with the index position?
조회 수: 1 (최근 30일)
이전 댓글 표시
clc
clear
t=0:.001:10;
y=sin(2*pi*t);
I want to count the frequency of repeated values in 'y' . How can I do that? I also want to print out the index position where value is being repeated.
Thanks!
댓글 수: 0
채택된 답변
the cyclist
2019년 9월 28일
Be aware, though, that due to accuracy of floating point numbers, you may not get exact repeated values when you expect them.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!