Reputation: 1144
I have a cell array with two types of strings: 'ANN' and 'QTR'.
I am trying to get a vector with ones if cell array equals 'QTR'.
Here's an example of what I am trying to do:
A = {'ANN';'ANN';'ANN';'ANN'; 'QTR'; 'ANN'; 'QTR'; 'QTR'; 'QTR'; 'QTR'};
logic1 = A == 'QTR'
However, this sort of notation doesn't seem to work well with cells. I have looked for workarounds, but did not manage to find any.
Any help would be much appreciated.
Upvotes: 1
Views: 174