generate_settings_matrix function

Build a settings matrix