⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x1.m

📁 I try to create GUI using Matlab to code hills polygraph cipher
💻 M
字号:
function y = x1(kk)
x=[];
x=kk;
l=size(x);
for i=1:l(1,2)-1
    if double (x(i))~=32
        for j=i+1:l(1,2)
            if x(i)==x(j)
                x(j)='*';
            end
        end
    else
        x(i)='*';
    end
end
j=1;
for i=1:l(1,2)
    if x(i) ~= '*'
        y(j) = x(i);
        j = j+1;
    end
  l=size(y);
end    

for i=1:26
peta(i)=char (96+i);
end
for i=1:l(1,2)
    for j=1:26
            if y(i)==peta(j)
                peta(j)='*';
            end
    end
end
j=l(1,2)+1;
for i=1:26
    if peta(i) ~= '*'
        y(j) = peta(i);
        j = j+1;
    end
end    
%fprintf('%s\n', y);
m=1;
for i=1:l(1,2)
    j=i;
    while j<26
        sctr(m)=y(j);
        j=j+l(1,2);
        m=m+1;
    end
end
y=sctr;
return



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -