Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6581089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:06:31+00:00 2026-05-25T16:06:31+00:00

I am trying to calculate the convolution of x(t) = 1, -1<=t<=1 x(t) =

  • 0

I am trying to calculate the convolution of

x(t) = 1, -1<=t<=1
x(t) = 0, outside

with itself using the definition.

http://en.wikipedia.org/wiki/Convolution

I know how to do using the Matlab function conv, but I want to use the integral definition. My knowledge of Matlab and WolframAlpha is very limited.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:06:32+00:00Added an answer on May 25, 2026 at 4:06 pm

    I am still learning Mathematica myself, but here is what I came up with..

    First we define the piecewise function (I am using the example from the Wikipedia page)

    f[x_] := Piecewise[{{1, -0.5 <= x <= 0.5}}, 0]
    

    piecewise_function

    Lets plot the function:

    Plot[f[x], {x, -2, 2}, PlotStyle -> Thick, Exclusions -> None]
    

    function_plot

    Then we write the function that defines the convolution of f with itself:

    g[t_] = Integrate[f[x]*f[t - x], {x, -Infinity, Infinity}]
    

    convolution_integral

    and the plot:

    Plot[g[t], {t, -2, 2}, PlotStyle -> Thick]
    

    convolution_plot


    EDIT

    I tried to do the same in MATLAB/MuPad, I wasn’t as successful:

    f := x -> piecewise([x < -0.5 or x > 0.5, 0], [x >= -0.5 and x <= 0.5, 1])
    

    func_def

    plot(f, x = -2..2)
    

    func_plot

    However when I try to compute the integral, it took almost a minute to return this:

    g := t -> int(f(x)*f(t-x), x = -infinity..infinity)
    

    convolution

    the plot (also took too long)

    plot(g, t = -2..2)
    

    convolution_plot

    Note the same could have been done from inside MATLAB with the syntax:

    evalin(symengine,'<MUPAD EXPRESSIONS HERE>')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

am trying to calculate mean and variance using 3X3 window over image(hXw) in opencv...here
I'm trying to calculate text width using jQuery. I'm not sure what, but I
I'm trying to calculate the area of the circle and the rectangle by using
I am trying to calculate the distance between two map point using Google Map
I'm trying to calculate autocorrelation of sample windows in a time series using the
I am trying to calculate the difference between two times using JavaScript. It's just
I'm trying to calculate SHA1 hash of a unicode string using T-SQL. The below
I am trying to calculate MAC for TLS v 1.1 Client Finished packet using
I'm trying to calculate password entropy in ColdFusion (I know I could do it
While trying to calculate the function between a touch point (dx, dy), i am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.