?? code.m
字號:
%realise the inverse of binary code
%實(shí)現(xiàn)碼位倒置的函數(shù)
function xc=code(x)
N=length(x)
n1=dec2bin(N-1)
L=length(n1)
n=0:N-1;
A=dec2bin(n);
for i=1:L/2
swap=A(:,i);
A(:,i)=A(:,L-i+1);
A(:,L-i+1)=swap;
end
B=bin2dec (A);
B=B'+1
xc=x;
for i=1:N
xc(i)=x(B(i));
end
xc
return
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -