FUNCTION REFERENCE

conv

Convolution of two vectors, or polynomial multiplication.

Convolution of two vectors, or polynomial multiplication.

Syntax

w = conv(u, v)

Syntax

w = conv(u, v, shape)

shape is 'full' (default), 'same' (central part, same size as u) or 'valid'

(only the part computed without zero padding).

With 'full' the result has the orientation of the longer input (of v when

both have the same length); with 'same' and 'valid' that of u.

Example

conv([1 2 3], [1 1])   % [1 3 5 3]

Differences from MATLAB: real, logical and complex double vectors only. The

product is computed directly, with no FFT shortcut. Complex results with zero

imaginary parts are real, as in MATLAB.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.