find_in_cells

version 1.0.0 (1.71 KB) by Mukund Iyer
Find index for cell that matches pattern in a cell array.

11 Downloads

Updated 9 Dec 2021

View License

FIND_IN_CELLS Find index for cell that matches pattern in a cell array.
[ROW,COL] = FIND_IN_CELLS(INPUT_CELL_ARRAY,PATTERN) finds all
instances of PATTERN and returns their row and column address.
[ROW,COL,ERROR] = FIND_IN_CELLS(INPUT_CELL_ARRAY,PATTERN) finds all
instances PATTERN, returns their row/column address and return error
object, if any.
PATTERN can be numeric or alphabetical. It can also contain expressions
generally used in REGEXP.
If PATTERN is not found in any of the cells then the ROW and COL values
will be -1. If any error occurs then ERROR variable will be assigned
with error object.

Cite As

Mukund Iyer (2022). find_in_cells (https://www.mathworks.com/matlabcentral/fileexchange/103290-find_in_cells), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with R2016b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!