Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - Русский - 日本語

Please note that the recommended version of Scilab is 6.0.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Traitement du Signal > conv

conv

discrete 1-D convolution.

Calling Sequence

C = conv(A,B [,shape])

Parameters

A

a real or complex vector.

B

a real or complex vector.

shape

an optional character string with possible values:

  • "full", conv computes the full convolution. It is the default value.
  • "same", conv computes the central part of the convolution of the same size as A.
  • "valid", conv computes the convolution parts without the zero-padding of A.
C

a real or complex vector.

Description

conv uses a straightforward formal implementation of the one-dimensional convolution equation in spatial form.

C=conv(A,B [,shape]) computes the one-dimensional convolution of the vectors A and B:

  • With shape=="full" the dimensions of the resultC are given by size(A,'*')+size(B,'*')+1. The indices of the center element of B are defined as floor((size(B,'*')+1)/2).
  • With shape=="same" the dimensions of the resultC are given by size(A). The indices of the center element of B are defined as floor((size(B,'*')+1)/2).
  • With shape=="valid" the dimensions of the result C are given by size(A,'*')-size(B,'*')+1) if and(size(A,'*')-size(B,'*'))>=0 else C is empty . The indices of the center element of B are defined as 1.

Note that convol can be more efficient for large arrays.

Examples

A=1:10;
B=[1 -1];
conv(A,B)

See Also

Used Functions

The conv function is based on the conv2 builtin.

History

VersionDescription
5.4.0 Function conv introduced.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:54:32 CEST 2014