hslogic算法仿真 logistic图像加解密
%加密程序 function b=jiami(a,s,h) [m1,n1]=size(a(:,:,1)); x=zeros(1,m1+n1); y=[1:m1+n1]; %然后, 用Logitic 映射产生混沌序列: for n=1:m1+n1-1 x(1)=s; q=h; x(n+1)=q*x(n)*(1- x(n)); end %排序行置乱 for f=1:m1-1 for h=f:m1 if x(f)>x(h) k=x(f); x(f)=x(h); x(h)=k;