summaryrefslogtreecommitdiff
path: root/3871/CH3/EX3.16/Ex3_16.sce
blob: bdebb00e1af0a868a7c23cb1c01ffa38c6bf0b34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

//===========================================================================
//chapter 3 example 16

clc;clear all;

//variable declaration
E     =200;          //limiting voltage in V
R     = 1000;        //resistance in  Ω
eE    = 1;           //relative limiting error(dE/E) in %
eR    = 5;           //relative limting error(dR/R) in %

//calculations
P     = (E**2)/(R);      //normal power consumed in W
eP    = ((2*eE)+eR);            //relative limiting error(dP/P) in measurement of power in %
dP    = P*(eP/(100));                  //limitng error of power in watts

//result
mprintf("Normal power consumed = %3.2f W",P);
mprintf("\nrelative limitng error in power measurement= %3.2f percentage rangng +eP to -eP",eP);
mprintf("\nlimitng error of power = %3.2f percentage",dP);