summaryrefslogtreecommitdiff
path: root/Oscillations_and_Waves_by_S._Prakash/chapter11.ipynb
blob: f6794e5d8e9f66a7acdb0b1aaf38c5fa02913d43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
 "metadata": {
  "name": "",
  "signature": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 11, Lissajous' Figures "
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1, page 448"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Frequencies\n",
      "#given data :\n",
      "t=2.0 # in sec\n",
      "n1=100.0 # in vibrations/sec\n",
      "n2a=n1+(1/t) \n",
      "n2b=n1-(1/t) \n",
      "print \"Frequency, n2a = %0.2f \" %n2a\n",
      "print \"frequency, n2b = %0.2f \"%n2b"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Frequency, n2a = 100.50 \n",
        "frequency, n2b = 99.50 \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2, page 448"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "# Frequencies\n",
      "#given data :\n",
      "t1=15 # in sec\n",
      "t2=10 # in sec\n",
      "n2=400 # in vibrations/sec\n",
      "n1a=n2+(1/t1) \n",
      "n1b=n2-(1/t1) \n",
      "print \"Frequency, n1a = %0.2f Hz \" %n1a\n",
      "print \"Frequency, n1b = %0.2f Hz \" %n1b\n",
      "n_1a=n2+(1/t2) \n",
      "n_1b=n2-(1/t2) \n",
      "print \"Frequency, n_1a = %0.2f Hz \" %n_1a\n",
      "print \"Frequency, n_1b = %0.2f Hz \" %n_1b"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Frequency, n1a = 400.07 Hz \n",
        "Frequency, n1b = 399.93 Hz \n",
        "Frequency, n_1a = 400.10 Hz \n",
        "Frequency, n_1b = 399.90 Hz \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3, page 449"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Frequencies\n",
      "#given data :\n",
      "t1=15 # in sec\n",
      "t2=10 # in sec\n",
      "n2=256 # in vibrations/sec\n",
      "n1a=(2*n2)+(1/t1) \n",
      "n1b=(2*n2)-(1/t1) \n",
      "print \"Frequency, n1a = %0.2f Hz \" %n1a\n",
      "print \"Frequency, n1b = %0.2f Hz \" %n1b\n",
      "n_1a=(2*n2)+(1/t2) \n",
      "n_1b=(2*n2)-(1/t2) \n",
      "print \"Frequency, n_1a = %0.2f Hz \" %n_1a\n",
      "print \"Frequency, n_1b = %0.2f Hz \" %n_1b"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Frequency, n1a = 512.07 Hz \n",
        "Frequency, n1b = 511.93 Hz \n",
        "Frequency, n_1a = 512.10 Hz \n",
        "Frequency, n_1b = 511.90 Hz \n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}