I want to rescale my matrix(56,53), it is filled with numbers from 1 to 7 and NaNs. I would like to change the 1 to 7, 2 to 6, 3 to 5 and 5 to 3, 6 to 2, and 7 to 1.
I found this solution https://stackoverflow.com/questions/48542055/reverse-coding-in-matlab but it does not work for me even though I replaced the NaNs with 0.
Any suggestions? Thank you in advance.
Best Answer