How do I use use logical relations on a character array?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Anonymous Matrix
el 15 de Feb. de 2017
Comentada: Anonymous Matrix
el 15 de Feb. de 2017
Say like I have an array animals=[cat;dog;hamster;shark;duck;bat]. How do I get an array that only contains animals that is spelled with 4 or more letters?
0 comentarios
Respuesta aceptada
Stephen23
el 15 de Feb. de 2017
>> a = {'cat';'dog';'hamster';'shark';'duck';'bat'};
>> a(cellfun('length',a)>3)
ans =
'hamster'
'shark'
'duck'
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Multidimensional Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!