Question

Using the facilities of numpy, write a python program that reads the input signal as a...

Using the facilities of numpy, write a python program that reads the input signal as a space separated sequence of numbers on one line, and the system impulse response as a space separated sequence of numbers on the next line, and outputs (on one line) the output of the DT LTI system.

The input lines should be interpreted as

x[0] x[1] x[2] ... x[N-1]
h[0] h[1] h[2] ... h[M-1]

and the output should be produced in the same order:

y[0] y[1] y[2] ... y[S-1]

where S is related to N and M.

Homework Answers

Answer #1

I can help you.

But there is a small confusion in your question. You dosent told how the calculation of

y[0] y[1] y[2] ... y[S-1] 

has to be done.(specify it in the comments, I will update the answer based on that)

You can read the lines in and convert to each input as follows

Program :

import numpu as np

x = input("Enter signals : (x[0] x[1] x[2] ... x[N-1]) : ")
x = x.split() # This line will seperate each signals and store as an array

h = input("Enter system impulse response : (h[0] h[1] h[2] ... h[M-1]) : ")
h = h.split() # This line will seperate each system impulse response and store as an array

# Find the length of each data
N = len(x)
M = len(h)

# Convert the list to numpy array, For easy computations:
x = numpy.array(x)
h = numpy.array(h)

Now for the final computation,

Please give the details, how to compute the y,

I will update the answer based on your response.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Solve this signal problem. Suppose the output y[n] of a DT LTI system with input x[n]...
Solve this signal problem. Suppose the output y[n] of a DT LTI system with input x[n] is y[n-1] - 10/3y[n] + y[n+1] = x[n] The system is stable and the impulse response of h[n] = A1*(B1)^n*C1 + A2*(B2)^n*C2 is then, What is A1? What is B1? What is C1? What is A2? What is B2? What is C2?
The signal x[n] is the input of an LTI system with impulse function of h[n]. x[n]...
The signal x[n] is the input of an LTI system with impulse function of h[n]. x[n] = (0.4)^n u[n] and h[n] = (0.2)^n u[n]. (a) What is the DTFT of the output of the LTI system? (b) What are the Energy density spectrums of the input and output signals? (c) What would be the inverse DTFT: X(w) = 1/(1-0.25e^-j(w-2)) (d) How would part (c) differ for the DTFT: X(w) = 1/(1-0.25e^-j(w-2)) + 1/(1-0.25e^-j(w+2))
Write a Python program to ask user input of a string, then ask user input of...
Write a Python program to ask user input of a string, then ask user input of what letters they want to remove from the string. User can either put in "odd", "even" or a number "n" that is greater than 2. When user input "odd", it will remove the characters which have odd numbers in the sequence of the string. When user input "even", it will remove the characters which have even numbers in the sequence of the string. When...
An LTI system has an impulse answer of h[n] = a^(n)H[n], H[n] is the Heaviside step...
An LTI system has an impulse answer of h[n] = a^(n)H[n], H[n] is the Heaviside step function. Obtain the output y[n] from the system when the input is x[n]=H[n]. 2. Consider the discrete system defined by> y[n] - ay[n-1] =x[n] Find the output when the input is x[n] = Kb^(n)H[n], and y[-1]=y_(-1)\ Find the output when the input is x[n] = K ẟ [n], and y[-1]=a Find the impulse response when the system is initially at rest. Find the Heaviside...
Given an input signal x[n], and the impulse response h[n], compute the output signal. x[n] =...
Given an input signal x[n], and the impulse response h[n], compute the output signal. x[n] = a^n * u[1-n]          for |a| > 1 h[n] = u[2-n]
In Coral,write a program that reads a list of 10 integers and outputs those Integers in...
In Coral,write a program that reads a list of 10 integers and outputs those Integers in Reverse. For coding Simplicity, follow each output integer by a space, including the last one. Then, output a new line. Example if the input is 2 4 6 8 10 12 14 16 18 20, the output is: 20 18 16 14 12 10 8 6 4 2 to achieve above first read the integers into an array. Then output the array in reverse
IN C LANGUAGE This program initially reads two integers from standard input: (1) an integer T...
IN C LANGUAGE This program initially reads two integers from standard input: (1) an integer T and (2) a positive integer N. It then reads N integers and counts the numbers that are greater than T and the numbers than are less than T. It then prints out these two counts. Example What is the threshold value? 7 How many values? 5 Enter 5 values: 6 7 9 9 8 3 values are greater than 7 1 values are less...
Write a program in python to display all the consonant in the user input. E.g. user...
Write a program in python to display all the consonant in the user input. E.g. user input: Hello Good Day to you. Output: consonant H = 1 consonant l = 2 consonant G = 1   consonant d = 1 consonant D = 1 etc
(C++) Write a program whose input is two characters and a string, and whose output indicates...
(C++) Write a program whose input is two characters and a string, and whose output indicates the number of times each character appears in the string. Ex: If the input is: n M Monday the output is: 1 1 Ex: If the input is: z y Today is Monday the output is: 0 2 Ex: If the input is: n y It's a sunny day the output is: 2 2 Case matters. Ex: If the input is: n N Nobody...
Python Programming 1. Write the following Python expressions in mathematical notation. a. dm = m *...
Python Programming 1. Write the following Python expressions in mathematical notation. a. dm = m * (sqrt(1 + v / c) / sqrt(1 - v / c) - 1) b. volume = pi * r * r * h c. volume = 4 * pi * r ** 3 / 3 d. z = sqrt(x * x + y * y) 2. What are the values of the following expressions? In each line, assume that s = "Hello" t =...