Calculate discrete-time convolution and find the output sequence y[n] from two comma-separated input sequences x[k] and h[n-k], with steps.
Discrete Time Convolution Formula
Discrete time convolution combines two finite sequences, usually an input signal x[k] and an impulse response h[n-k], to produce an output sequence y[n].
y[n] = \sum_{k=0}^{M-1} x[k]h[n-k]y[n]= output sequence at indexnx[k]= first input sequence value at indexkh[n-k]= second input sequence value at shifted indexn-kM= number of values in the first input sequencen= output indexk= summation index
For two finite sequences with lengths L and M, the output sequence length is:
N_y = L + M - 1
N_y= number of samples in the output sequenceL= number of samples in the first sequenceM= number of samples in the second sequence
The calculator takes comma-separated sequence values. When the output sequence is blank and both input sequences are entered, it multiplies and sums the overlapping terms for each output index. Values outside the entered sequence range are treated as zero.
Common Discrete Convolution Output Lengths
| Length of x[n] | Length of h[n] | Length of y[n] |
|---|---|---|
| 2 | 2 | 3 |
| 3 | 2 | 4 |
| 4 | 3 | 6 |
| 5 | 5 | 9 |
How to Interpret Sequence Entry and Output
| Item | Meaning | Example |
|---|---|---|
| Input format | Enter values separated by commas. | 1, 2, 3 |
| First value | Treated as index 0 unless you track a different origin separately. | x[0] = 1 |
| Negative values | Allowed as normal sequence samples. | 2, -1, 4 |
| Output length | Sum of input lengths minus 1. | Lengths 3 and 2 give length 4 |
Example Problems
Example 1
Find the convolution of:
x[n] = 1, 2, 3h[n] = 4, 5
The output length is 3 + 2 - 1 = 4.
Compute each output value:
y[0] = 1(4) = 4y[1] = 1(5) + 2(4) = 13y[2] = 2(5) + 3(4) = 22y[3] = 3(5) = 15
Result: y[n] = 4, 13, 22, 15
Example 2
Find the convolution of:
x[n] = 2, -1h[n] = 1, 0, 3
The output length is 2 + 3 - 1 = 4.
y[0] = 2(1) = 2y[1] = 2(0) + (-1)(1) = -1y[2] = 2(3) + (-1)(0) = 6y[3] = (-1)(3) = -3
Result: y[n] = 2, -1, 6, -3
FAQ
How do you enter a sequence?
Enter the values in order, separated by commas. For example, enter 3, 0, -2, 5 for a four-sample sequence. Spaces after commas are fine.
Does the first value always mean n = 0?
For the calculation, the first entered value is treated as index 0. If your sequence has a different time origin, such as an origin at the middle value, the numeric convolution values are still computed the same way, but you need to track the output index shift separately.
Why is the output longer than the input sequences?
Linear discrete convolution includes every partial overlap between the two sequences. If one sequence has length L and the other has length M, there are L + M - 1 overlap positions, so the output has L + M - 1 samples.
