blob: 2af2527a411d8642c0c89ff9ab9d1e0f48b8a895 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//===========================================================================
//chapter 9 example 3
clc;clear all;
//variable declaration
H = 120; //number of holes on the rotating disc
f = 5400; //frequency of output pulses in per second
//calculations
N = (f/(H))*60; //rotational speed in rpm
//result
mprintf("rotational speed = %3.2f rpm",N);
|