MATLAB: How to find out if subset of data is or ins’t greater than an altered mean value

logical?matrixmean

I have a large matrix with each row representing a data sample and the columns the information of that data sample. Columns 14:37 of the data represent different chlorophyll concentrations for the sample. I need to find out which samples have chlorophyll concentrations greater than 1.5 of the mean in the upper quarter of the sample (so at least one column for that sample between columns 14:19 have a chlorophyll concentration greater than 1.5 of that of the mean chlorophyll concentration (mean of rows 14:37)). The data which does have a chlorophyll concentrations greater than 1.5 of that of the mean in this upper quartile needs to be given a 1 (for yes) and those that don't a 0 (for no). How would I go about doing this?
Thanks,
Natalie

Best Answer

thresh=mean(data(:,14:37),2)*1.5;
data(:,14:19)=bsxfun(@ge, data(:,14:19) , thresh);