How to set values to NaN when they AREN'T within the given indices
13 views (last 30 days)
I am attempting to set several values in a large matrix to NaN based on indices that I do not want to have NaN values. I attempted using logicals but matlab doesn't change anything (see photo). In this example, I expect every value but the bottom right to be set equal to NaN. I checked previous posts and this was how it was done in 2014.