diff options
Diffstat (limited to '3871/CH9/EX9.2/Ex9_2.sce')
-rw-r--r-- | 3871/CH9/EX9.2/Ex9_2.sce | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/3871/CH9/EX9.2/Ex9_2.sce b/3871/CH9/EX9.2/Ex9_2.sce new file mode 100644 index 000000000..7febc3cd6 --- /dev/null +++ b/3871/CH9/EX9.2/Ex9_2.sce @@ -0,0 +1,16 @@ +//===========================================================================
+//chapter 9 example 2
+
+clc;clear all;
+
+//variable declaration
+R = 4; //digital counter reading
+G = 0.001; //gatting period in s
+T = 150; //number of teeth on rotor
+
+//calculations
+f = R/(G); //number of pulses per second
+N = (f/T)*60; //rotational speed in rpm
+
+//result
+mprintf("rotational speed = %3.2f rpm",N);
|