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

📄 u_step.m

📁 《Digital and Analog Communications Systems》(《数字和模拟通信系统》)的配套MATLAB源代码
💻 M
字号:
function y = u_step(t,Tbegin)
% FILE: U_STEP.M
% CALL: y = u_step(t,Tbegin)
% This file creates a unit step for the time vector "t"
% that begins at time t=Tbegin.

n = length(t);
i = 1;
j = 0;

temp = 0;
while(temp == 0)
  if (t(i) >= Tbegin)
    temp = 1;
    j = i;
  else
    i = i+1;
    if (i > n)
      temp = 1;
    end;
  end;
end;

y = zeros(n,1);
if (j > 0)
  for (i = j:1:n)
    y(i) = 1;
  end;
end;
end;



⌨️ 快捷键说明

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