{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 11: Fractals" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.3_1: Dimension_of_Self_Similar_Fractals.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 11.3.1 Page 407\n", "//Non-Linear Dynamics and Chaos, First Indian Edition Print 2007\n", "//Steven H. Strogatz\n", "clear;\n", "clear;\n", "clc;\n", "close;\n", "\n", "// m = number of copies.\n", "// r = scale factor.\n", "m=2;\n", "r=3;\n", "\n", "d=log(m)/log(r)\n", "\n", "//End of Example." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.3_2: Dimension_of_Self_Similar_Fractals.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 11.3.2 Page 407\n", "//Non-Linear Dynamics and Chaos, First Indian Edition Print 2007\n", "//Steven H. Strogatz\n", "clear;\n", "clear;\n", "clc;\n", "close;\n", "\n", "// m = number of copies.\n", "// r = scale factor.\n", "m=4;\n", "r=3;\n", "\n", "d=log(m)/log(r)\n", "\n", "//End of Example." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.3_3: Dimension_of_Self_Similar_Fractals.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 11.3.3 Page 408\n", "//Non-Linear Dynamics and Chaos, First Indian Edition Print 2007\n", "//Steven H. Strogatz\n", "clear;\n", "clear;\n", "clc;\n", "close;\n", "\n", "// m = number of copies.\n", "// r = scale factor.\n", "m=3;\n", "r=5;\n", "\n", "d=log(m)/log(r)\n", "\n", "//End of Example." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.4_1: Box_Dimension.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 11.4.1 Page 409\n", "//Non-Linear Dynamics and Chaos, First Indian Edition Print 2007\n", "//Steven H. Strogatz\n", "clear;\n", "clear;\n", "clc;\n", "close;\n", "\n", "// N(E) = minimum number of D-dimensional cubes of side E needed to cover S.\n", "\n", "n=poly(0,'n') //Defining polynomial in 'n'\n", "Num = (n*log(2)) //Num. = Numerator\n", "Den = (n*log(3)) //Den. = Denominator\n", "disp('The box dimension is :')\n", "\n", "d=(Num)/(Den) //d = Box Dimension.\n", "\n", "\n", "//End of Example." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.4_2: Box_Dimension.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 11.4.2 Page 410\n", "//Non-Linear Dynamics and Chaos, First Indian Edition Print 2007\n", "//Steven H. Strogatz\n", "clear;\n", "clear;\n", "clc;\n", "close;\n", "\n", "// N(E) = minimum number of D-dimensional cubes of side E needed to cover S.\n", "\n", "n=poly(0,'n') //Defining polynomial in 'n'\n", "Num = (n*log(8)) //Num. = Numerator\n", "Den = (n*log(3)) //Den. = Denominator\n", "disp('The box dimension is :')\n", "\n", "d=(Num)/(Den) //d = Box Dimension.\n", "\n", "\n", "//End of Example." ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }