Taken I have some transition operations where certain numbers of my matrix (M) are being substituted with each other (all ones become 5, all 2s become 6, etc.). Now I know I can write a code like this:
if M(1,1)== 1 M(1,1)=5 end
if M (1,1)== 2 M(1,1)=6 end
if M(1,2)==1 M(1,2)=6 end
Of course if I have (10-by-10-by-10) matrix this is a lot of unnecessary work. Is there a possibility to either define the 3 dimensions (column, row, page) or to tell matlab something like:
% scan from point (1,1,1) to point (10,10,10) and apply mathematical operations when condition is fulfilled.
Thank you