**AIM:**

**Study and Implementation of Plot and Stem Command.**

**THEORY:**

**1. For ‘STEM’ Command:**

A discrete time signal has a value defined
only at discrete points in time in these signals the independent variables
takes only a discrete set of integer values.

e.g. Attendance of students Vs date
(time)

Representation of DT sequence:

**Unit Step:**

A
discrete unit step is denoted as u(n) and is mathematically defined as

The
DT unit step signal is shown is fig,

**Unit Impulse:**

The
discrete time unit impulse is denoted as
and is mathematically defined as

The
DT unit impulse signal is shown in fig.

**Sinusoidal:**

The
discrete time sinusoidal is denoted as
and is mathematically defined as

The
DT unit sine signal is shown in fig.

**Unit Ramp:**

The
discrete time unit ramp is denoted as
and is mathematically defined as

The
DT unit ramp signal is shown in fig.

**Exponential Growing:**

The
discrete time Exponential growing is denoted as
and is defined as

The
DT Exponential growing signal is shown in fig.

Exponential Decaying:

The
discrete time Exponential decaying is denoted as
and is defined as

The
DT Exponential decaying signal is shown in fig.

**2. For ‘PLOT’ Command:**

Similarly like Stem command plot command
having same concept. Instead of stem just use Plot command for getting
continuous signals.

Syntax for plot:

Plot(x coordinate values, y coordinate values).

**PORCEDURE:**

1. Define samples on x axis.

2. Define amplitude on y axis according
to each and every signal.

3. Using stem function just discretize x axis
and use plot signal for getting continuous signal.

4. Give xlabel, ylabel and title.

**1. Plot Command Implementation:**

**Program:**

% Implementation of Plot Command

%sine Wave

x=0:0.001:10;

y=sin(x);

subplot(3,2,1)

plot(x,y);grid on

title('Sine Wave')

%cos wave

y1=cos(x);

subplot(3,2,2)

plot(x,y1);grid on

title('Cosine Wave')

%Exponential Growing Wave

y2=exp(x);

subplot(3,2,3)

plot(x,y2);grid on

title('Exponential
Growing Wave')

%Exponential Decaying Wave

y3=exp(-x);

subplot(3,2,4)

plot(x,y3);grid on

title('Exponential
Decaying Wave')

%Exponential Decaying Wave

y4=x;

subplot(3,2,5)

plot(x,y4);grid on

title('Ramp Signal')

**2. Stem Command Implementation:**

**Program:**

% Implementation of Discrete signals

% Sine wave

x=0:1:20;

y=sin(x);

subplot(3,2,1)

stem(x,y);grid on

title('Sine Wave')

%cos wave

y1=cos(x);

subplot(3,2,2)

stem(x,y1);grid on

title('Cosine Wave')

%Exponential Growing Wave

y2=exp(x);

subplot(3,2,3)

stem(x,y2);grid on

title('Exponential
Growing Wave')

%Exponential Decaying Wave

y3=exp(-x);

subplot(3,2,4)

stem(x,y3);grid on

title('Exponential
Decaying Wave')

%Exponential Decaying Wave

y4=x;

subplot(3,2,5)

stem(x,y4);grid on

title('Ramp Signal')

## No comments:

## Post a comment