function nx = quadmap(x,p)
% QUADMAP(X,P) does one iteration of the quadratic map:  P X (1-X)
%     quadmap(X,P) -- X is state, P is parameter
%     quadmap(X) -- default value of P == 4

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

if nargin < 2 
  p = 4;
end

nx = p * x * (1-x);
