Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C Program.Thanks! ai + n] + b[i] Problem 6: Convolution and Zero Padding (20%) Given two arrays, you should do the following steps: 1. Zero

image text in transcribedimage text in transcribed

C Program.Thanks!

ai + n] + b[i] Problem 6: Convolution and Zero Padding (20%) Given two arrays, you should do the following steps: 1. Zero padding: you should add two Os to the first array. One in the beginning and the other at the end. 2. Define convolution as len(b)-1 c[n] i=0 Where a is the first array after zero padding, b is the second array, c is the output where n is in range [0, len(a)-len(b)+1]. You can get more information from the example. Input: The first line is the length of the first array. The second line is the first array. The third line is the length of the second array. The fourth line is the second array. Output: the output array c Output 25 28 21 13 73 65 96 59 93 139 289 160 129 117 123 116 For example: Input 4 9 754 3 121 10 9 75439 1 10 11 32 5 12147 6 12 4 7 8 11 2 5 16532 Procedure: (1) 25 = 1*0 + 2*9 + 1*7 28 = 1*9 +2*7+1*5 21 = 1*7+2*5 + 1*4 13 = 1*5 + 2*4 + 1*0 (2) 73 = 1*0 + 2*9 + 1*7 +4*5 + 7*4 65 = 1*9 +2*7 + 1*5 +4*4 + 7*3 96 = 1*7 + 2*5 + 1*4 + 4*3 +7*9 59 = 1*5 + 2*4 + 1*3 +4*9 + 7*1 93 = 1*4 + 2*3 + 1*9 +4*1 + 7*10 139 = 1*3 + 2*9 + 1*1 + 4*10 + 7*11 289 = 1*9 + 2*1 + 1*10+ 4*11 + 7*32 160 = 1*1 + 2*10 + 1*11+ 4*32 + 7*0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions