blob: 737709ff2c59e5e482fa5e05ecdf9a659e5ef56c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//===========================================================================
//chapter 8 example 5
clc;clear all;
//variable declaration
n = 15; //number of revolutions made
M = 750; //meter constant in revolutions per kWh
T = 30; //time in seconds
//calculations
E = n/(M); //Energy consumed in 30 seconds
L = (E*3600)/T; //load in kW
//result
mprintf("Energy consumed in 30 seconds = %3.2f kWh",E);
mprintf("\nLoad = %3.2f kW",L);
|