% generate 3 matrices for a demo
A1 = randn(72,2);
A2 = randn(5,2);
A3 = randn(3, 2);
% generate a structure
s = {A1, A2, A3};
% 3 logical statement
f1 = cellfun(@(x) size(x,1)<5, s);
f2 = cellfun(@(x) all(x(:,1)==x(1,1)), s);
f3 = cellfun(@(x) all(x(:,2)==x(1,2)), s);
% or merge f1 and f2 and f3 in one logical statment
% f4 = f1 or f2 or f3
f4 = cellfun(@(x) size(x,1)<5 | all(x(:,1)==x(1,1)) | all(x(:,2)==x(1,2)), s);