function y = tentmap(x,p)
%   TENTMAP(X,P) does one iteration of the tent map at parameter P.
%   P = 1.99999 is the chaotic one.

%   Copyright 2003
%   Centre for Nonlinear Dynamics in Physiology and Medicine

if x > .5
  x = 1-x;
end
y = p*x;

