help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Very basic question


From: Zdenek Hurak
Subject: Re: Very basic question
Date: Thu, 31 Jul 2003 07:46:58 -0500
User-agent: KMail/1.4.3

When it comes to writing a convolution routine, one possible way is to use the 
fact that convolution operator is often represented in matrix form as a 
banded Toeplitz matrix:

octave:8> a = [1 2 3]'; b = [4 5 6 7]';
octave:9> A = toeplitz([a;0;0;0],[1 0 0 0])
A =

  1  0  0  0
  2  1  0  0
  3  2  1  0
  0  3  2  1
  0  0  3  2
  0  0  0  3

octave:10> A*b
ans =

   4
  13
  28
  34
  32
  21

Lets check it:

octave:11> conv(a,b)
ans =

   4  13  28  34  32  21


Best regards,
Zdenek Hurak





Dne čt 31. červenec 2003 14:39 address@hidden napsal(a):
> Hello Uli,
>
> If you really need to _convolve_ two signals, then the dot product won't do
> that for you (unless you write the convolution routine yourself). There are
> different flavors of convolution--continuous (for which matrices won't
> help), discrete, and circular discrete name a few.
>
> Many use the conv.m in Matlab and Octave, perhaps that will help you.
>
> Ben
>
>
>
>                       Ulrich Grassberger
>                       <ulrich.grassberger@        To:       Octave mailing
> list <address@hidden> telebel.de>                 cc:
>                                                   Subject:  RE: Very basic
> question 07/30/2003 08:39 PM
>
>
>
>
>
>
> Thanks!
>
> I need to convolute two signals, that is the dot product. The
> documentation for Octave is a bit unclear about this at
> http://www.octave.org/doc/octave_2.html because it presumes that
> the reader already knows higher math.
>
> Uli
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------

-- 
********************************************************
Zdenek Hurak
Center for Applied Cybernetics, Czech Technical University 
Karlovo namesti 13/E, Prague, 12135, Czech Republic
E-mail: address@hidden 
Web: http://ar.c-a-k.cz/hurak 
Tel.: +420 224357683, +420 608345922 
********************************************************



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]