How to plot delta dirac and unit step functions

194 views (last 30 days)
Hey all, I am having trouble trying to plot (via stem) some delta dirac and unit step functions for my Digital Signal Processing class!
The ones in particular I am trying to plot are as follows:
Thanks!
  9 Comments
Steven Artzer
Steven Artzer on 24 Sep 2020
Okay then I guess I'm mostly trying to figure out how to plot the functions listed... Like how exactly I find or write a function in Matlab for those.
Walter Roberson
Walter Roberson on 24 Sep 2020
Edited: Walter Roberson on 24 Sep 2020
I already showed you how to plot the functions. What I posted above was actual code.
Further example of plotting.
t = 1 : 10;
y = randi([0 1], 1, 10);
stem(t, y);
I think you should concentrate on writing functions that implement dirac delta and unit step.

Sign in to comment.

Answers (1)

Kiran Felix Robert
Kiran Felix Robert on 4 Nov 2020
Hi Steven,
The Examples shown above can be used to plot the functions using stem.
Refer the documentation of Dirac-delta(Dirac)and unit-step(heaviside) they point to the MATLAB Built-in functions for the unit-step and Dirac-Delta Functions. You can use these Built-in functions to write your required expression and plot using stem.
Kiran Felix Robert

Categories

Find more on Equivalent Baseband Simulation in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!