Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
convolution of two functions

Subject: convolution of two functions

From: richard

Date: 1 Sep, 2013 14:10:10

Message: 1 of 3

I want to convolute these two functions

f=inline('gaussmf(x,[3,0])','x')

h=inline('normpdf(x,0,4)','x')

I am simply doing this to try to obtain the convolution:

g=conv(h,f)

and I am just getting a number, I want to get a function as a result of the convolution.

I am not understanding what else I need to add to this to get the convolution.

Subject: convolution of two functions

From: Nasser M. Abbasi

Date: 1 Sep, 2013 20:43:44

Message: 2 of 3

On 9/1/2013 9:10 AM, richard wrote:
> I want to convolute these two functions
>
> f=inline('gaussmf(x,[3,0])','x')
>
> h=inline('normpdf(x,0,4)','x')
>
> I am simply doing this to try to obtain the convolution:
>
> g=conv(h,f)
>
> and I am just getting a number, I want to get a function as a result of the convolution.
>
> I am not understanding what else I need to add to this to get the convolution.
>

matlab conv works on list of numbers (vectors) not "functions". try

--------------------
  h = @(x) normpdf(x,0,4);
  f = @(x) gaussmf(x,[3,0]);
  x = -5:.1:5;
  y = conv(h(x),f(x));
  plot(y)
-------------------

Subject: convolution of two functions

From: Roger Stafford

Date: 3 Sep, 2013 06:09:07

Message: 3 of 3

"richard " <richard7893@embarqmail.com> wrote in message <kvvhs2$eqd$1@newscl01ah.mathworks.com>...
> I want to convolute these two functions
> f=inline('gaussmf(x,[3,0])','x')
> h=inline('normpdf(x,0,4)','x')
- - - - - - - - -
  I answered your question in:
http://www.mathworks.com/matlabcentral/answers/86136

Roger Stafford

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us