Understanding Cell Array Indices
古いコメントを表示
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!