Based on your comments, it sounds like you want the output to be a vector of values, one for each file. The values would be 1 if suggestion contains errors and -1 if it is empty.
The problem is that since suggestion
is a cell array, you cannot compare it using the boolean operator ==' . If you want a vector of outputs, you will also need to index
feature20` each iteration. Here's a potential fix.
It sounds like isempty(suggestion)
gives the wrong answer, so try this one:
if sum(~cellfun(@isempty,suggestion))==0
feature20(i)=-1;
else
feature20(i)=1;
end