DSP

产生混沌序列

2019-07-13 15:09发布

程序需要产生混沌序列




检索到如下代码;
#include<stdio.h>
typedefunsigned
charu1;
typedefunsigned
shortu2;
typedefunsigned
longu4;
u2huntun(u2x)
...{u1H8,L8;
u2xp;u4T;
H8
=x/256;L8=x%256;
xp
=256*L8+H8;
T
=(u4)xp*x;
T
=T<<1;
T
=1+~T;
returnT>>16;
}

main()
...{u2x;intk;
printf(
"initialx=");
doscanf("%u",&x);
while(x<12);
for(k=1;k<=200;k++)
...{
printf(
"%6u",x);
if(k%10==0)printf(" ");
x
=huntun(x);
}

}