https://github.com/springerlab/Flow-Cytometry-Toolkit
Tip revision: a1d929989fb4c58246babc2f2de8e680ce945484 authored by Bo Hua on 27 September 2016, 15:21:49 UTC
Merge branch 'master' of https://github.com/springerlab/Flow-Cytometry-Toolkit into develop
Merge branch 'master' of https://github.com/springerlab/Flow-Cytometry-Toolkit into develop
Tip revision: a1d9299
calcmetricplate.m
function metrics = calcmetricplate(platedata, metricfunc, varargin)
% CALCMETRICPLATE calculates a metric from the data in each well /
% subpopulation of PLATEDATA.
%
% Created 20141021 by JW
% parse arguments, set defaults
if ~isa(metricfunc, 'function_handle')
metricfunc = @meanmetric;
end
% calculate metrics
metrics = nan(size(platedata));
for r = 1:size(platedata,1)
for c = 1:size(platedata,2)
for ipop = 1:size(platedata,3)
metrics(r,c,ipop) = metricfunc(platedata(r,c,ipop));
end
end
end