0

I know that plotting a delta function is a bit confusing in MATLAB and a potential solution can be found using the following code:

x = -10 : 0.1 : 10;
y = double(x == 0);
plot(x, y);

What if I have a signal like: S(f) = Pa + Pbδ(f-fo) + Pbδ(f+fo)

How can I plot such a signal? Thanks

Stavros Afxentis
  • 289
  • 1
  • 4
  • 16
  • How about using arrows as it's common in textbooks. [This](http://stackoverflow.com/a/25730013/5457944) answers how to draw arrow. – Vahid Jun 28 '16 at 15:22
  • @Vahid : thanks this might by a solution – Stavros Afxentis Jun 28 '16 at 15:29
  • See also: [Deriving dirac delta function using Matlab symbolic toolbox](http://stackoverflow.com/questions/33707851/deriving-dirac-delta-function-using-matlab-symbolic-toolbox) – horchler Jun 28 '16 at 15:30

0 Answers0