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

1 次查看(过去 30 天)
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