Team:Alberta/Project/Modeling/InvertListArray

%Takes the genes in WithThis that are not in the first list of InvertThisArray, and puts them all %in a new list inside InvertedList. Repeats for every list in %InverThisArray. %The array must be the first input argument!!! function [InvertedListArray] = InvertListArray(InvertThisArray, WithThis) for y = 1:length(InvertThisArray) InvertedList=cell(1); Match=zeros(size(WithThis)); for a=(1:length(InvertThisArray{y})) for b=(1:length(WithThis)) if strcmp(InvertThisArray{y}(a), WithThis(b)) == 1 Match(b)=1; end end end d=1; for c=(1:length(WithThis)) if Match(c)==0 InvertedList(d)=WithThis(c); d=d+1; end end InvertedListArray{y}=InvertedList' SizeOfInvertedList=size(InvertedList); end