How To Replace Elements In Array Matlab For Loop