Bus Admittance Matrix 1
implement bus admittance matrix using matlab, java and python
Loading...
Searching...
No Matches
Functions | Variables
display_output.m File Reference

Functions

function display_output (n, V, I, S, SL) % Display results(Optional
 Display the output results in a tabular format.
 
Print the table header fprintf ('%-10s %-20s %-20s %-20s %-20s\n', headers{1}, headers{2}, headers{3}, headers{4}, headers{5})
 
 fprintf ('%s\n', repmat('-', 1, 90))
 

Variables

function remove if you want no output at all data = {}
 
Initialize an empty cell array for storing data for i
 
Line Loss end end Display the table with headers headers = {'Bus Pair', 'Voltage', 'Current', 'Line Flow', 'Line Loss'}
 
 result = [headers
 

Function Documentation

◆ display_output()

function display_output ( n  ,
V  ,
I  ,
S  ,
SL   
)

Display the output results in a tabular format.

Calculate lineflows and line losses.

Parameters
nThe number of buses in the system.
VThe voltage matrix.
IThe current matrix.
SThe line flow matrix.
SLThe line loss matrix.

◆ fprintf() [1/2]

Print the table header fprintf ( '%-10s %-20s %-20s %-20s %-20s\n'  ,
headers{1}  ,
headers{2}  ,
headers{3}  ,
headers{4}  ,
headers{5}   
)

◆ fprintf() [2/2]

fprintf ( '%s\n ,
repmat('-', 1, 90)   
)

Variable Documentation

◆ data

Line Flow data = {}

◆ headers

Line Loss end end Display the table with headers headers = {'Bus Pair', 'Voltage', 'Current', 'Line Flow', 'Line Loss'}

◆ i

Print a separator line Print the table rows for i
Initial value:
= 1:n
for j = 1:n
data{end+1, 1} = sprintf('%d-%d', i, j)
function remove if you want no output at all data
Definition display_output.m:9
Initialize an empty cell array for storing data for i
Definition display_output.m:11
n
Definition lineflow_loss.m:5

◆ result

result = [headers