Divide the shuffled sequence Q={Q1,Q2,Q3,···,Qm×n}. into MN/16 matrices which are 4×4. M=256 and N=256

조회 수: 1 (최근 30일)
x=0.3;
p=0.343;
for n=2:65536;
if x(n-1)>=0 & x(n-1)<=p
x(n)=x(n-1)/p;
else
x(n)=(1-x(n-1))/(1-p);
end
end
A=sort(x);
[A,T]=sort(x);
Q=R(T);
whats next.? thanks in advance.
  댓글 수: 1
Jan
Jan 2019년 6월 28일
I've formatted your code today. Please do this by your own using the toolbar on top of the section for editing the message.

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2019년 6월 28일
Replace
A=sort(x);
[A,T]=sort(x);
Q=R(T);
by
Q = Q(randperm(65536, 65536));
Then:
Q4 = reshape(Q, 4, 4, numel(Q)/16)
Now Q4(:, :, n) is the n.th matrix.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by