Team:Alberta/Project/Modeling/InvertList

From 2009.igem.org

Revision as of 06:58, 2 October 2009 by Ebennett (Talk | contribs)
%Creates a list of genes called InvertedList that includes all genes in
%WithThis that are not present in InvertThis.

%InvertThis = essgenes;
%WithThis=model.genes;

function [InvertedList] = InvertList(InvertThis, WithThis)

InvertedList=cell(1);
Match=zeros(size(WithThis));
for a=(1:length(InvertThis))
    for b=(1:length(WithThis))
        if strcmp(InvertThis(a), WithThis(b)) == 1
            Match(b)=1;
        end
    end
    a;
end
d=1;
for c=(1:length(WithThis))
    if Match(c)==0
        InvertedList(d)=WithThis(c);
        d=d+1;
    end
end
InvertedList=InvertedList';
SizeOfInvertedList=size(InvertedList)