summaryrefslogtreecommitdiff
path: root/1319/CH1/EX1.8/1_8.sce
blob: 08a8dd0691f4ead949a849d1ecbb6c9c93604d03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//To find the current and impedance and admittance of the circuit

clc;
clear;

R=25;
Xl=50*%i;
Z1=R+Xl;

Z2=-40*%i;

V=100;

Zeq=(Z1*Z2)/(Z1+Z2);

Y=1/Zeq;

I=V*Y;

mprintf('The Current of the circuit = %f /_ %f A \n',abs(I),atand(imag(I)/real(I)))
mprintf('The Impedance of the circuit = %f /_ %f ohms \n',abs(Zeq),atand(imag(Zeq)/real(Zeq)))
mprintf('The Admittance of the circuit = %f /_ %f siemens \n',abs(Y),atand(imag(Y)/real(Y)))