how should I stem convolution?

5 views (last 30 days)
Armin Javidfar
Armin Javidfar on 25 Dec 2015
Commented: Image Analyst on 26 Dec 2015
can anyone help me draw this convolution?
y[n] = dirac[n-1] * (U[n] - U[n-6])
I'm very new to matlab and I need some help to figure out my problem. tnx in advance...
  2 Comments
Walter Roberson
Walter Roberson on 25 Dec 2015
What is dirac[n-1] intended to mean?
Is U a continuous function that is being sampled at integer locations? Or is it an array that is being indexed? If it is an array then y[1] through y[6] are not defined.
Armin Javidfar
Armin Javidfar on 25 Dec 2015
this is the question

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 25 Dec 2015
Under a quite reasonable interpretation of dirac[n-1], the function y[n] would always be 0 . Unless U can assume infinite values, in which case y would be undefined.
  1 Comment
Image Analyst
Image Analyst on 25 Dec 2015
You can convolve with delta functions. It's done all the time. Basically it makes replicates of things. Like the Fourier Transform of a rectangular aperture is a 2D sinc function and so the Fourier transform of 2D array of square holes (one hole convolved with a 2D comb function) is an array of 2D sinc functions (a signle sinc convolved with a 2D comb).

Sign in to comment.


Image Analyst
Image Analyst on 25 Dec 2015
Hint to get the difference of the U's
kernel = ones(1, 13);
kernel(7) = 1;
kernel(end) = -1;
du = conv(U, kernel, 'full');
  4 Comments
Walter Roberson
Walter Roberson on 25 Dec 2015
It has to be time in this context. If you were sampling in space you would need to refer to the content of the location not just the index. For example, delta(X[n-1])
Image Analyst
Image Analyst on 26 Dec 2015
I don't follow. n could be an index representing a location in time with units of seconds, or an index representing a location in space with units of mm or whatever. I believe convolution by the dirac delta simply shifts the difference of U's signal one index to the left. I wonder where this equation came from. Maybe it's a 1-D spatial masking situation, or if it's a time signal maybe it's some kind of feedback reduction/echo cancellation filter.

Sign in to comment.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!