summaryrefslogtreecommitdiff
path: root/1958/CH3/EX3.3/Chapter3_example3.sce
diff options
context:
space:
mode:
Diffstat (limited to '1958/CH3/EX3.3/Chapter3_example3.sce')
-rwxr-xr-x1958/CH3/EX3.3/Chapter3_example3.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/1958/CH3/EX3.3/Chapter3_example3.sce b/1958/CH3/EX3.3/Chapter3_example3.sce
new file mode 100755
index 000000000..034d151f0
--- /dev/null
+++ b/1958/CH3/EX3.3/Chapter3_example3.sce
@@ -0,0 +1,13 @@
+clc
+clear
+//Input data
+m=0.5//Mass of the block in kg
+x=0.05//Distance to which block is pulled in m
+k=300//Force constant of the spring in N/m
+
+//Calculations
+U=(1/2)*k*x^2//Potential energy of the block in J
+v=x*sqrt(k/m)//Velocity of the block in m/s
+
+//Output
+printf('Potential energy of the block when spring is in stretched position is %3.3f J \n Velocity of the block when it passes through the equilibrium position is %3.2f m/s',U,v)