I have a 3-dimensional matrix, after some code manipulation on a cell array. The matrix is of size 101x151x476.
The first number represents the y space, the second number is the x space, and the third number is the number of time steps. So essentially, the matrix contains magnitudes along a y-x plane, for varying timesteps.
I am trying to compute the peaks at each (y,x) across the timesteps. I am doing this using findpeaks. This is what I have so far:
for yIndex= 1:1:101 for xIndex= 1:1:151 [peaks{y,x}] = findpeaks(a3Dmatrix(yIndex,xIndex,:)); endend
However, the cell "peaks" is incorrect, as it is not of the size 101×151 (y by x). Any help with this?
Best Answer