view signals/private/unify.m @ 6:0ce3c2070089

Removed duplicate code and fixed doc in timed_action.
author samer
date Mon, 14 Jan 2013 14:33:37 +0000
parents 289445d368a7
children
line wrap: on
line source
% this is weird but it works
% nan means variable, so max(nan,x)=x
% inf means failure so max(inf,x)=inf
function z=unify(x,y)
	if ~isfinite(x) || ~isfinite(y), z=max(x,y);
	elseif x==y, z=x; 
	else z=inf; 
	end
end