Problem 43181. Find index of a string in a cell array

Write a function that finds the index at which the cell array of strings C contains the exact string S.

So if

C = {'twenty-one'; 'twenty-two'; 'twenty-three'; 'one'; 'two'; 'three'};

then

y = cellfind('one', C); 

should return 4

Solution Stats

67.24% Correct | 32.76% Incorrect
Last Solution submitted on Dec 01, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers37

Suggested Problems

More from this Author14

Community Treasure Hunt

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

Start Hunting!