summaryrefslogtreecommitdiff
path: root/24/CH17/EX17.7/Example17_7.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /24/CH17/EX17.7/Example17_7.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '24/CH17/EX17.7/Example17_7.sce')
-rwxr-xr-x24/CH17/EX17.7/Example17_7.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/24/CH17/EX17.7/Example17_7.sce b/24/CH17/EX17.7/Example17_7.sce
new file mode 100755
index 000000000..3cafb6b51
--- /dev/null
+++ b/24/CH17/EX17.7/Example17_7.sce
@@ -0,0 +1,24 @@
+//Given that
+L = 1.2 //in meter
+u = 1.6*10^-3 //in kg/m
+f = 120 //in Hz
+g = 9.8 //in m/s^2
+
+//Sample Problem 17-7a
+printf("**Sample Problem 17-7a**\n")
+n = 4
+//T = m*g
+//v = sqrt(m*g/u)
+//f = n*v/(2*L)
+m = (2*L*f)^2*u/(g*n^2)
+printf("The value of m should be %fkg\n", m)
+
+//Sample Problem 17-7b
+printf("\n**Sample Problem 17-7b**\n")
+M = 1 //in kg
+n = sqrt((2*L*f)^2*u/(g*M))
+if abs(n - round(n)) < 0.01 then
+ printf("The allowed wave mode is %d", n)
+else
+ printf("No wave mode will be allowed")
+end \ No newline at end of file