Text this: Matrix-dependent Strain Distributions of Au and Ag Nanoparticles in a Metal-oxide-semiconductor-based Nonvolatile Memory Device