0% found this document useful (0 votes)
19 views3 pages

Convolution Visualization with Matplotlib

Uploaded by

fairy302005
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views3 pages

Convolution Visualization with Matplotlib

Uploaded by

fairy302005
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

import matplotlib.

pyplot as plt
import numpy as np
x1 = [Link]([1.0, 2.0, 3.0])
x2 = [Link]([0, 1, 0.5, 1])
y = [Link](x1, x2)

# Create time indices


n1 = [Link](len(x1))
n2 = [Link](len(x2))
n3 = [Link](len(y))

[Link](2, 2, 1)
[Link](n1, x1)
[Link]("Signal x1")
[Link]("n")
[Link]("Amplitude")

[Link](2, 2, 2)
[Link](n2, x2)
[Link]("Signal x2")
[Link]("n")
[Link]("Amplitude")

[Link](2, 2, 3)
[Link](n3, y)
[Link]("Convolution Result y = x1 * x2")
[Link]("n")
[Link]("Amplitude")

[Link]()
print(y)

import [Link] as plt


import numpy as np
x1 = [Link]([-1.0, 2.0, -3.0])
x2 = [Link]([0, -1, 0.5, 1.0])
y = [Link](x1, x2)

# Create time indices


n1 = [Link](len(x1))
n2 = [Link](len(x2))
n3 = [Link](len(y))

[Link](2, 2, 1)
[Link](n1, x1)
[Link]("Signal x1")
[Link]("n")
[Link]("Amplitude")

[Link](2, 2, 2)
[Link](n2, x2)
[Link]("Signal x2")
[Link]("n")
[Link]("Amplitude")

[Link](2, 2, 3)
[Link](n3, y)
[Link]("Convolution Result y = x1 * x2")
[Link]("n")
[Link]("Amplitude")

[Link]()
print(y)

import [Link] as plt


import numpy as np
x1 = [Link]([-1.0, 2.0, -3.0])
x2 = [Link]([0, -1, 0.5, 1.0])
y = [Link](x1, x2)

n1 = [Link]([-1, 0, 1])
n2 = [Link]([-2, -1, 0, 1])
n3 = [Link](n1[0] + n1[0], n1[0] + n1[0] + len(y))

[Link](2, 2, 1)
[Link](n1, x1)
[Link]("Signal x1")
[Link]("n")
[Link]("Amplitude")

[Link](2, 2, 2)
[Link](n2, x2)
[Link]("Signal x2")
[Link]("n")
[Link]("Amplitude")

[Link](2, 2, 3)
[Link](n3, y)
[Link]("Convolution Result y = x1 * x2")
[Link]("n")
[Link]("Amplitude")
[Link]()
print(y)

n= [Link](-5, 5);
x1 = [Link](n>=0)
x2 = [Link](n>=3)

You might also like