how to create a relation b/w two vector by scrambling of vector. let two vector R & S then scrambled and vector T is formed.

조회 수: 4 (최근 30일)
R & S s.that s(i)=r(t(i))

채택된 답변

Walter Roberson
Walter Roberson 2018년 6월 28일
t = randperm(length(r));
s = r(t);
  댓글 수: 3

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

추가 답변 (1개)

Sultan Mehmood
Sultan Mehmood 2018년 7월 2일
편집: Walter Roberson 2018년 7월 2일
plz help me is it true for pixel permutation.
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
plot(x);
A=sort(x);
T=randperm(length(x));
A(n)=x(T(n));
I = imread('camera man.png');
R = I(:,:,1);
Z = reshape(randperm(numel(R)),size(R));
P=Z(:);
Q=P';
Y=randperm(length(Q));
y(n)=Q(T(n));

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by