Team:Alberta/Project/Modeling/MaxMinAvg

From 2009.igem.org

Revision as of 07:15, 2 October 2009 by Ebennett (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
%Since FindMinimalGenomes.m finds an indefinite number of possible minimal genomes, the researcher is likely going to want to know 
%how small the smallest list is, and where in the cell array that minimal genome is located (along with other statistical information).

function [maxValue minValue avg] =  MaxMinAvg(ArrayYeah)

L=0;

for u=1:length(ArrayYeah)
    L(u)=length(ArrayYeah{u}); 
end

maxValue = max(L)
[minValue minPosition] = min(L)
avg = sum(L)/length(L)