Team:Alberta/Project/Modeling/InvertList
From 2009.igem.org
%Creates a list of genes called InvertedList that includes all genes in %WithThis that are not present in InvertThis.
%Example %InvertThis = LiteratureGenes; %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)