Phase Shuffle takes a lot of memory, Is there any way to avoid this? Thanks.
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!