I want to read (in matlab) specific characters from a cell which contains a mixture of numbers and texts. How can i do that in matlab? Could anybody help me with codes, please.

Here is the example:

r1200i000-0ln140010.LID

This represents a mixture of characters in a particular cell. I have more than such 100000 rows (cells) in single column. I want to read the 14th and 15 th character (here 14th is 1 and 15th is 4) and write this value in a different column in the same row.

I have used the following codes:

—————————————————————–

v = {xlsread(‘test data.xlsx’, ‘A2:A165238′)};

out=cellfun(@(x) str2num(x(14:15)),v,’un’,0);

—————————————————————–

Still matlab shows errors: ??? Index exceeds matrix dimensions. Error in ==> @(x)str2num(x(14:15))

??? Error using ==> cellfun

Input #2 expected to be a cell array, was double instead.