Turning signal flow graphs into matrices