Problem 3: Write the function convolve that will calculate the confolution of two functions f, g on [0, t] interval. The convolution is defined as (f*g)(t) = f* f(r)g(t−7) dr__for f,g: (0,00) → R. The argument function f and g should be passed by pointers. The integral should be approxi- mated by the Riemman sum, i.e., ● f = sin(x), g = = sin(x) where Ax = ba and x₁ = a +i Ax. Define the functions func1, func2 and func3, that return n sin(x), cos(x) and ³ respectively. Use these functions to calculate the convolution of f = sin(x), g = ● = cos(x) f = sin(x), g = x³ for t27 and n = 1000. cb [ f(x) d a n ƒ (x) dx = ➤ ƒ (x₁) Ax, -£fa i=1
Problem 3: Write the function convolve that will calculate the confolution of two functions f, g on [0, t] interval. The convolution is defined as (f*g)(t) = f* f(r)g(t−7) dr__for f,g: (0,00) → R. The argument function f and g should be passed by pointers. The integral should be approxi- mated by the Riemman sum, i.e., ● f = sin(x), g = = sin(x) where Ax = ba and x₁ = a +i Ax. Define the functions func1, func2 and func3, that return n sin(x), cos(x) and ³ respectively. Use these functions to calculate the convolution of f = sin(x), g = ● = cos(x) f = sin(x), g = x³ for t27 and n = 1000. cb [ f(x) d a n ƒ (x) dx = ➤ ƒ (x₁) Ax, -£fa i=1
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Language: C
Write the function convolve that will calculate the confolution of two functions f, g on [0, t] interval. The convolution is defined as (f ∗ g)(t) = Z t 0 f(τ )g(t − τ ) dτ for f, g : [0, ∞) → R. The argument function f and g should be passed by pointers. The integral should be approximated by the Riemman sum, i.e., Z b a f(x) dx = Xn i=1 f(xi) ∆x, where ∆x = b−a n and xi = a + i ∆x. Define the functions func1, func2 and func3, that return sin(x), cos(x) and x 3 respectively. Use these functions to calculate the convolution of f = sin(x), g = sin(x) f = sin(x), g = cos(x) f = sin(x), g = x 3 for t = 2π and n = 1000.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 7 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education