Understanding Cell Array Indices
Mostrar comentarios más antiguos
I have a large cell array imported from a .csv file which contains numbers and strings. I am trying to use the index of a matching string to give me a row or column for the corresponding data. I am able to identify the string and it's "index" using the following:
TEXT={'103.9685,10:27:37,2016-02-03','103.9685,12:00:00,2016-01-03' '103.9685,11:27:37,2016-02-03' '103.9685,12:00:00,2016-02-03' };
%
ARRAY = cellfun(@(x)~isempty(strfind(x,'12:00:00')), TEXT);
%
INDICES = find(ARRAY(:) > 0
The challenge that I have is that this code gives me a single value index, at a value that doesn't make sense for either my number of rows or columns. Can somebody help me understand what this index value means, and how I might go about using it to find my row or column number that I'm originally looking for.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Characters and Strings 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!