The program is good, but too complex to understand.
We developed a simple way to solve this peoblem in our new submitted file signal_flow_graphz. Where the network description file is replaced by a connection matrix Q and an input Matrix P. The simultaneous equations of the linear system are expressed in a matrix form:
The solution is expressed by a simple MATLAB inversion command line:
Thus the calculation process is completely transparent to the user and eazier to debug or to modify. In signal_flos_graphz this command line is replaced by a function sigflow.m just for doing some check to matrices Q and P. Moreover, this method is valid to MIMO systems.