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

📄 convert.m

📁 Digital communication labs,
💻 M
字号:
function y=convert(x,len)

a = dec2bin(x);

y = ones(len,1)*48;

pos = length(a);

for index = len:-1:(len-length(a)+1)
    y(index) = a(pos);
    pos = pos-1;
end

y=y-48;

y=y';

⌨️ 快捷键说明

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