Use reflection to generate external matrices