summaryrefslogtreecommitdiff
path: root/24/CH17/EX17.6/Example17_6.sce
diff options
context:
space:
mode:
Diffstat (limited to '24/CH17/EX17.6/Example17_6.sce')
-rwxr-xr-x24/CH17/EX17.6/Example17_6.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/24/CH17/EX17.6/Example17_6.sce b/24/CH17/EX17.6/Example17_6.sce
new file mode 100755
index 000000000..3aee4f3d0
--- /dev/null
+++ b/24/CH17/EX17.6/Example17_6.sce
@@ -0,0 +1,17 @@
+//Given that
+Ym1 = 4.0*10^-3 //in meter
+Ym2 = 3.0*10^-3 //in meter
+phi1 = 0 //in rad
+phi2 = %pi/3 //in rad
+
+//Sample Problem 17-6
+printf("**Sample Problem 17-6**\n")
+//For horizontal component
+Ymh = Ym1*cos(phi1) + Ym2*cos(phi2)
+//For vertical component
+Ymv = Ym1*sin(phi1) + Ym2*sin(phi2)
+Ym = sqrt(Ymv^2 + Ymh^2)
+beta = atan(Ymv/Ymh)
+printf("The amplitude of the resultant wave is equal to %fmm\n", Ym*10^3)
+printf("The phase constant for the wave is %frad\n", beta)
+printf("The equation of wave is %f*sin(k*x - w*t + %frad)",Ym, beta) \ No newline at end of file