MATLAB: Matching only parts of two cell arrays

find

A= {'36450A107';'36467A107';'38067A107'}
B={'36467A'};
How can I find that the 2nd cell in A matches the first 6 characters of B?

Best Answer

out=find(cellfun(@(x) strcmp(x(1:6),B),A))