hi there guys I have to make a program that computes for the convolution, but I am still quite confused how convolution works?

I have a matlab program in my pc and I tried to use convolution there and here is what I got:

>> x=[3,4,5];
>> y=[5,4,3];
>> conv (x,y)

ans =

15 32 50 32 15

What happened? Why did I get a 15 32 50 32 15 answer? I mean where did it came from? I know 5x3 is a 15 but the rest is just plain confusing for me. please help me.

These -> 15 32 50 32 15 are the coefficients of the polynomial you'd get if you
multiplied the polynomials 3*x^2 + 4*x + 5 and 5*x^2 + 4*x + 3 together.

Useful links -> Discrete Convolution, Cauchy Product

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.