I know this question has alreayd been asked a million times, yet I have not managed to solve it by looking at previous documentation.
I have a 3d matrix. I want to find the max value in each "page" (max of 1st and 2nd dimension) along the third dimension. And I also want to know the indeces of the value.
Here is my attempt at the code.
C is my 3d matrix i want to get the max values from.
Cmax = zeros(1,numkx);
row = zeros(1,numkx);
column = zeros(1,numkx);
for c = 1 : numkx
Cmax(:,:,c) = max(Cpage(:));
[row,column] = find(Cpage(:) == Cmax(1,c));