function RET_ = calcFilter(vars)
	if ~def(vars)
		error("Argument 'vars' is not specified")
	end
	
	vars = ucase(vars);
	if max(size(vars))==1 & vars=="ALL"
		RET_ = ones(ncase,1);
	else
		pok = GetVarPos(vars);
		indx = find(pok==0);
		if indx~=[]
			vars(indx) = lcase(vars(indx));
		end
		indx = find(pok);
		if indx~=[]
			vars(indx) = "Data(:,\""+vars(indx)+"\")";
		end
		indx = find(vars=="*");
		if indx~=[]
			vars(indx) = ".*";
		end
		
		s = "RET_=";
		for i=1:max(size(vars))
			s = s+vars(i)+" ";
		end
		s = s+";";
		eval(s);
		if size(RET_,1)<size(RET_,2)
			RET_ = RET_';
		end
	end
end

