Is there a way to count within the pattern, different points in a graph before repeating?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Prayash Thapa
am 18 Feb. 2021
Kommentiert: darova
am 25 Feb. 2021

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 Kommentare
Akzeptierte Antwort
darova
am 19 Feb. 2021
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)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!