summaryrefslogtreecommitdiff
path: root/1319/CH1/EX1.6/1_6.sce
blob: a4c714e83b70771894b3f20406adee7833bd9c10 (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
25
26
27
28
// Determine the value of the circuit components

clc;
clear;

Z=10-(30*%i);

f=1*(10^6);

Y=1/Z;

G=real(Y);
B=imag(Y);

// G= 1/R
// B= wC


w=2*%pi*f;

R=1/G;

C=B/(w);

cap=abs((10^9)*C)/(10^9);

disp('ohms',R,'The resistance of the circuit =')
disp('nF',cap,'The capacitance of the circuit =')