function f = jagged(x,n,a,s) %JAGGED Computes an approximation of a continuous nowhere differentiable % function. % % jagged(x,n,a,s) is given by % __ % \ | 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