For the implementation in MATLAB, see this repository. This section assumes Ubuntu 18.04 (also tested on Ubuntu 22.04), but the procedure is similar for other Linux distributions.
MATLAB programs for solving the power-flow equations using either of methods: Gauss-Seidel (G-S), Newton-Raphson (N-R) & Fast Decoupled Load Flow (FDLF). Numerical solution to the incompressible ...