Given a vector how do I use loops to show the in index value of where in the vector there is a certain value.
Info
This question is closed. Reopen it to edit or answer.
Show older comments
x=[4,6,7,6,4,3,3,5,6,3,3,3,6,7,5,3] %find where sub=[3,3] index point using loops so in this example the answer would be 6,10,11 how do i do this using a loop.
Answers (1)
Azzi Abdelmalek
on 24 Apr 2014
Without a loop
x=[4,6,7,6,4,3,3,5,6,3,3,3,6,7,5,3]
idx=strfind(x,[3 3])
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!