Is there a way to find the index of a subsection of a vector?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
David Haydock
am 7 Jun. 2022
Beantwortet: David Haydock
am 7 Jun. 2022
Lets say I have the vector
a = [1,2,1,2,3,4,5,1,2,1];
and I need to search through it to find:
b = [1,2];
and get the output which shows me the indexes of where the start of each b is.
i.e.
out = [1, 3, 8];
Any help would be appreciated
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!