Hello everyone. I have this 3 dimensional matrix called spectrums and I want to shift the 3rd dimension by different amounts given by vector shifts. Is there a way to do this without using a for loop? something like
shifted_spectrums=arrayfun(@(k) circshift(spectrums(:,:,k),shifts(2:end),2),spectrums);
but a solution that actualy works 😛
PS: 3rd dimension of spectrums has 22 elements and shifts has 23 elements, that's why the 2:end.
Best Answer