How to find pattern in an array?
Mostrar comentarios más antiguos
How to find a pattern from a numeric array?
For example, there is a numeric array B and pattern (or mask) A. How to get the pattern location found in B?
>> A = [1 2 3];
>> B = [5,4,3,1,2,3,5,4,1,2,3,4,5];
Expected output: 4, 9
Respuesta aceptada
Más respuestas (1)
claudio
el 14 de Mayo de 2020
2 votos
output = strfind(B,A);
1 comentario
claudio
el 14 de En. de 2021
No exceptions. if you have a particular request you can submit it to evaluate the specific case
str = sprintf('Special string for \t Karel \t K');
pattern = sprintf('\t');
idxTab = strfind(str,pattern)
idxTab =
20 28
Categorías
Más información sobre Structures en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!