blob: e53bdfa7c420e09fa81facbe0a1169c717c6c7ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
//===========================================================================
//chapter 5 example 3
clc;
clear all;
//variable declaration
R = 500; //resistance in
r = 2000; //non inductive resistance in
V = 250; //voltage in V
f = 50; //frequency in Hz
L = 1; //inductance in H
//calculations
x = (r+R)^2;
W = (2*%pi*f*L)^2;
Z =sqrt(x+W); //impedance of the instrument circuit
I = V/(Z); //current drawn by instrument in A
I2 = V/(R+r); //since voltmeter reads correctly on dc supply on 250 V,corresponding current in A
V1 = V*(I/(I2)); //voltmeter reading when connected to 250V ,50Hz supply
//result
mprintf("voltmeter reading = %3.1d V",V1);
|