summaryrefslogtreecommitdiff
path: root/1958/CH4/EX4.1/Chapter4_example1.sce
diff options
context:
space:
mode:
Diffstat (limited to '1958/CH4/EX4.1/Chapter4_example1.sce')
-rwxr-xr-x1958/CH4/EX4.1/Chapter4_example1.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/1958/CH4/EX4.1/Chapter4_example1.sce b/1958/CH4/EX4.1/Chapter4_example1.sce
new file mode 100755
index 000000000..490624f6b
--- /dev/null
+++ b/1958/CH4/EX4.1/Chapter4_example1.sce
@@ -0,0 +1,13 @@
+clc
+clear
+//Input data
+w=4//Angular velocity in rad/s
+m=[1,2,3,4]//Masses in kg from the figure 4.17 on page no.54
+r=[2.5,1.5]//Centre position in m
+
+//Calculations
+I=(m(1)+m(2)+m(3)+m(4))*(r(1)^2+r(2)^2)//Moment of inertia in kg.m^2
+KE=(1/2)*I*w^2//Kinetic energy of the system in J
+
+//Output
+printf('The moment of inertia is %i kg.m^2 \n Kinetic energy of the system is %i J',I,KE)