function f = jagged(x,n,a,s) %JAGGED Computes an approximation of a continuous nowhere % differentiable function. % (By Douglas Arnold who happens to be at Penn. State U.) % % jagged(x,n,a,s) is __ % \ | n (s-2)m m % > a sin(a x). % /__| m=0 % In the limit as n->infinity this gives a continuous nowhere % differentiable function if a>1 and 1