I want to find the min value of the 1st layer in an n layer matrix and I want to get the indices too. I tried messing around with min() and ind2sub() but I could not get what I was looking for. How would I got about doing this? An example matrix is seen below.
N = randi([1,500],45,45)N(:,:,2) = randi([5,200], 45, 45)N(:,:,3) = randi([1,50], 45, 45)
Best Answer