number of values larger than matlab code example Example: number of values lager than matlab x=50*rand(7); a= x > 21; numel(a(a>0))