1

i have a matrix as

y = auto air condit freon articl hvx new cso uiuc edu tspila uxa cso uiuc edu tim spila romulan write articl apr ntuix ntu mgqlu ntuix ntu max write work ga solid adsorpt air con system for auto applic thi kind system energi for regener adsorb exhaust ga interest thi mail email follow thi thread discuss prospect thi technolog bite thi suppos work tim year ago demonstr cold air system us air call rovax unit work short come seal technolog todai

<< size(y)

ans =

 1   442

also i have another matrix tokenVector as

tokenVector = 

Columns 1 through 6

'abandon'    'abomin'    'aborigin'    'abraham'    'abruptli'    'absenc'

Columns 7 through 13

'absolut'    'absurd'    'abus'    'academi'    'acc'    'accept'    'accesori'

and when I am using ismember(y,tokenVector) then I am getting an error:

"Cell contents reference from a non-cell array object".

I am not getting meaning for error. Please help I am new to matlab.

1 Answer 1

1

I'm assuming your y is just a string i.e. declared as

y = 'auto air condit freon ar...'

in which case you just need to call strsplit first to split it into a cell matrix of words:

ismember( strsplit(y,' '), tokenVector)

The error is telling you that you need to use a cell array as the input instead of a simple char array. The strsplit function will split a char array into a cell array for you based on a specific delimiter, in this case a space, ' '.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.