| Bus Admittance Matrix 1
    implement bus admittance matrix using matlab, java and python | 
| Functions | |
| fprintf ('Enter the number of buses:') | |
| This program calculates lineflows and line losses of a power system by taking line voltages, currents,. | |
| display_output (n, V, I, S, SL) | |
| Calculate lineflows and line losses. | |
| Variables | |
| n = input('') | |
| Prompt the user for input | S = zeros(n, n) | 
| Initialize matrices. | |
| No output | V = zeros(n, n) | 
| No output | I = zeros(n, n) | 
| No output | y = zeros(n, n) | 
| No | output [V, I, y] = get_input(n,V,I,y) | 
| Get input from the user. | |
Calculate lineflows and line losses.
calculate_lineflow_loss Display the output display_output
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. | 
| fprintf | ( | 'Enter the number of buses:' | ) | 
This program calculates lineflows and line losses of a power system by taking line voltages, currents,.
and Line admittances as input from the user.
| end Return the bus and admittances return I = zeros(n, n) | 
| n = input('') | 
| end Return the bus and admittances return V = zeros(n, n) |