summaryrefslogtreecommitdiff
path: root/3556/CH11/EX11.2/Ex11_2.sce
blob: dd174425981645069cabb96f4681c8195c39b87c (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
29
30
31
32
33
clc
// Fundamental of Electric Circuit 
// Charles K. Alexander and  Matthew N.O Sadiku  
// Mc Graw Hill of New York 
// 5th Edition 

// Part 2     :  AC Circuits 
// Chapter 11 :  AC power Analysis 
// Example 11 - 2

clear; clc; close; 
//
// Given data
Z    = complex(30,-70)                  
V    = complex(120*cos(0),120*sin(0))   
//
// Calculations Current 
I    = V/Z;                             
I_real = real(I);                       
I_imag = imag(I);                       
I_magnitude  = norm(I);                               
I_angle      = atand(I_imag,I_real);   
//
// Display the result
disp("Example 11-2 Solution : ");
printf(" \n I_magnitude = Magnitude of Current   = %.3f A",I_magnitude)
printf(" \n I_angle     = Angle of Current       = %.3f A",I_angle)