Phase Shuffle takes a lot of memory, Is there any way to avoid this? Thanks.

조회 수: 1 (최근 30일)
daokun lee
daokun lee 2021년 3월 31일
function dlY=shuffle3d2(dlX)
num1=size(dlX,1);
num2=size(dlX,2);
num3=size(dlX,3);
k=randi([-2 2],1);
idy=1:num2;
idz=1:num3;
dlY=dlX;
if k>0
dlY(1:num1-k,idy,idz)=dlX(k+1:num1,idy,idz);
dlY(num1-k+1:num1,idy,idz)=dlX(num1-1:-1:num1-k,idy,idz);
elseif k<0
dlY(1:num1+k,idy,idz)=dlX(1:num1+k,idy,idz);
dlY(num1+k+1:num1,idy,idz)=dlX(1-k:-1:2,idy,idz);
else
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by