Difference between revisions of "Nowhere differentiable continuous function"

From JSXGraph Wiki
Jump to navigationJump to search
(Created page with "<jsxgraph width="500" height="500" box="box"> var bd = JXG.JSXGraph.initBoard('box', {axis:true,boundingbox: [-3, 1, 3, -1]}); var a = bd.create('slider', [[0.5,2],[2.5,2],[0,0...")
 
Line 1: Line 1:
 
<jsxgraph width="500" height="500" box="box">
 
<jsxgraph width="500" height="500" box="box">
  var bd = JXG.JSXGraph.initBoard('box', {axis:true,boundingbox: [-3, 1, 3, -1]});
+
  var bd = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox: [-3, 1, 3, -1]});
 
  var a = bd.create('slider', [[0.5,2],[2.5,2],[0,0.25,1]], {name:'a'});
 
  var a = bd.create('slider', [[0.5,2],[2.5,2],[0,0.25,1]], {name:'a'});
 
  var b = bd.create('slider', [[0.5,1.5],[2.5,1.5],[0,5,50]], {name:'b'});  
 
  var b = bd.create('slider', [[0.5,1.5],[2.5,1.5],[0,5,50]], {name:'b'});  
Line 7: Line 7:
 
             var i, s=0.0, n = N.Value(), aa= a.Value(), bb = b.Value();  
 
             var i, s=0.0, n = N.Value(), aa= a.Value(), bb = b.Value();  
 
             for (i=0; i<n; i++) {
 
             for (i=0; i<n; i++) {
                 s += Math.pow(a,i)*Math.cos(Math.pow(b,i)*Math.PI*x;
+
                 s += Math.pow(a,i)*Math.cos(Math.pow(b,i)*Math.PI*x);
 
             }
 
             }
 
             return s;
 
             return s;

Revision as of 19:02, 19 September 2011