text2int.m

来自「vigenere密码解密的matlab实现」· M 代码 · 共 14 行

M
14
字号
function y = text2int (x)% This function takes the letter in the string x and converts % it to an integer. % The convention for this function is%   a  --> 0%   b  --> 1%   and so on...if ( (x < 'a') | (x > 'z') ),   error('Text character out of range a-z');end;y=x - 'a';   %It helps to know Matlab tricks

⌨️ 快捷键说明

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