0% found this document useful (0 votes)
25 views

Matlab

The document describes unit step and unit impulse functions which are used to model abrupt changes in signals like a voltage being switched on or off in a circuit. The unit step function u(t) has a value of 0 for negative times and 1 for positive times. MATLAB code is provided to generate and manipulate unit step and impulse functions by delaying or advancing them along the time axis.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Matlab

The document describes unit step and unit impulse functions which are used to model abrupt changes in signals like a voltage being switched on or off in a circuit. The unit step function u(t) has a value of 0 for negative times and 1 for positive times. MATLAB code is provided to generate and manipulate unit step and impulse functions by delaying or advancing them along the time axis.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Unit Step Function:

In engineering applications, we frequently encounter functions whose values change


abruptly at specified values of time t. One common example is when a voltage is
switched on or off in an electrical circuit at a specified value of time t.
The switching process can be described mathematically by the function called the Unit
Step Function

The unit step function, u(t), is defined as

That is, u is a function of time t, and u has value zero when time is negative and value
one when time is positive

MATLAB code for generating Unit step Function:

n=-5:5;
y=[zeros(1:5), ones(1:6)];
stem(n,y)

Generating Delay in Unit Step Function:

n=-5:5;
y=[zeros(1:5), ones(1:6)];
n=n+1;
stem(n,y)
Generating Advance Unit Step Function:

n=-5:5;
y=[zeros(1:5), ones(1:6)];
n=n-1;
stem(n,y)

Unit Impulse Function:

Generating Unit Impulse Function:


n=-5:5;
y=[zeros(1:5), 1, zeros(1:5)];
stem(n,y)

Generating Delay in Unit Impulse Function:


n=-5:5;
y=[zeros(1:5), 1, zeros(1:5)];
n=n+1;
stem(n,y)

Generating Advance Unit Impulse Function:

n=-5:5;
y=[zeros(1:5), 1, zeros(1:5)];
n=n-1;
stem(n,y)

You might also like