| 
    Bus Admittance Matrix 1
    
   implement bus admittance matrix using matlab, java and python 
   | 
 
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 | |
Display the output results in a tabular format.
Calculate lineflows and line losses.
| n | The number of buses in the system. | 
| V | The voltage matrix. | 
| I | The current matrix. | 
| S | The line flow matrix. | 
| SL | The line loss matrix. | 
| 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) | |||
| ) | 
| Line Flow data = {} | 
| Line Loss end end Display the table with headers headers = {'Bus Pair', 'Voltage', 'Current', 'Line Flow', 'Line Loss'} | 
| Print a separator line Print the table rows for i | 
| result = [headers |