I have a 3D matrix: size(data) = [100, 3, 500] I want to replace all the -1s in the first column with 1s. Then, I want to replace all the -1s in the second and third columns with 0s.
Linear indexing doesn't seem to work because I have to replace the second and third column as well.