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

📄 index.m

📁 《Digital and Analog Communications Systems》(《数字和模拟通信系统》)的配套MATLAB源代码
💻 M
字号:
function pos = index(x,value)
% File: INDEX.M
% CALL: pos = index(x,value)
% This function returns the index of the x vector that equals value.
% That is, x(pos) = value

i = 1;
j = -1;
x = x(:);
temp = 0;
while (temp == 0)
  if (x(i) == value)
    j = 1;
    temp = 1;
  else
    i = i+1;
    if (i > length(x))
      temp = 1;
    end;
  end;
end;

if (j ~= -1)
  pos = i;
else
  pos = -1;
end;
end;




⌨️ 快捷键说明

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