diff options
author | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
---|---|---|
committer | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
commit | db0855dbeb41ecb8a51dde8587d43e5d7e83620f (patch) | |
tree | b95975d958cba9af36cb1680e3f77205354f6512 /Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb | |
parent | 5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (diff) | |
download | Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.gz Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.bz2 Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.zip |
add books
Diffstat (limited to 'Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb')
-rwxr-xr-x | Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb new file mode 100755 index 00000000..da8ea509 --- /dev/null +++ b/Oscillations_and_Waves_by_S._Prakash/chapter15.ipynb @@ -0,0 +1,126 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15, Musical sound & acoustic of buildings" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page 518" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log10\n", + "# decibles\n", + "#given data :\n", + "i1=4 #assume\n", + "i2=4*i1 #\n", + "dl=10*log10(i2/i1) #db\n", + "print \"Decibles by which intensity level will decrease = %0.2f db \" %dl" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decibles by which intensity level will decrease = 6.02 db \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page 519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import sympy\n", + "# ratio of amlitudes\n", + "#given data :\n", + "l1=10 #db\n", + "l2=40 #db\n", + "dl=l2-l1 #db\n", + "x=(10**(dl/10)) #\n", + "x1=sympy.sqrt(x) #\n", + "print \"Ratio of amplitudes =\", x1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of amplitudes = 10*sqrt(10)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page 521" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# frequency\n", + "#given data :\n", + "x=264 #key note\n", + "g=x*(3.0/2) #\n", + "print \"Frequency of note G = %0.f \" %g\n", + "cd1=x*2 #\n", + "print \"Frequency of note C = %0.f \"%cd1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of note G = 396 \n", + "Frequency of note C = 528 \n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} |