Is there a way to count within the pattern, different points in a graph before repeating?
조회 수: 1 (최근 30일)
이전 댓글 표시
For these graphs shown (both are same), is there a way to find out how many unique points there are before repeating again? For example, this graph shows there are 4 unique points and after that it just repeats the pattern. So I would like to find a way to output the 4 wihtout me manually counting (or no. of unique points depending on the pattern).
댓글 수: 0
채택된 답변
darova
2021년 2월 19일
You can round data to integer and use unique
x0 = rand(10,1);
x1 = round(10*x0); % round data to 1 symbol after the dot
unique(x1)
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!