function 3weierstrass

Upload: sabareesan09

Post on 10-Jan-2016

212 views

Category:

Documents


0 download

DESCRIPTION

2

TRANSCRIPT

function weierstrass(a,b,kmax)% WEIERSTRASS Plots Weierstrass's non-differentiable function for% the interval [0,1].%% w(x) = sum_{k=0}^{\infty} a^k \cos(2\pi b^k x)% with 0 < a < 1 and a*b >= 1%% Funktion arguments:% a, b : Coefficients (default: a=0.5, b=3)% k : upper limit of k for the computed sum (default:% k=20) % Author : Andreas Klimke, Universitt Stuttgart% Version : 1.0% Date : August 12, 2002 if nargin~=3 if nargin