COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Convolution with HP48GX ???

• Email
• Follow

```Dear People,

Does anyone know if it is possible to perform convolution of vectors with
the HP48GX without the need of developing a specialized program for that ?
If you are familiar with Matlab, I refer to convolution in the way that
Matlab can do it:

Thanks a lot for your responses, I appreciate that.

Ana

```
 0

See related articles to this posting

```pzzz... this was still alive in my pc.

Like in MATLAB, we can use the HP49G to compute the
convolution of two discrete signals. We use a method of
tabulating values similar to 'synthetic polynomial
multiplication' to form the output as the sum of shifted
rows. In this problem we enter the vectors as a list.

x[n] = { -1, -2, 1, 1 }
h[n] = { 1, 2, 3, 4, 5 }

M
y[n] = SUM h[k].x[n-k]     y[n] = x[n] * h[n]
k=0

n  |   0    1    2    3    4    5    6    7
------------+-----------------------------------------
x[n] |  -1   -2    1    1
h[n] |   1    2    3    4    5
| ----------------------------------------
h[0].x[n-0] |  -1   -2    1    1
h[1].x[n-1] |       -2   -4    2    2
h[2].x[n-2] |            -3   -6    3    3
h[3].x[n-3] |                 -4   -8    4    4
h[4].x[n-3] |                      -5  -10    5    5
| ----------------------------------------
y[n] |  -1   -4   -6   -7   -8   -3    9    5

The justification of this algorythm comes from writing the
sum as:

y[n] = h[0].x[n] + h[1].x[n-1] + h[2].x[n-2] + ...

In RPN enter this code

<<  \-> A B
\<< 'A' 'B' \-> C D
\<<    'C*D' EVAL
\>>
\>>
\>>

'CONV' STO

{ -1 -2 1 1 }
{ 1 2 3 4 5 }
CONV

{ -1 -4 -6 -7 -8 -3 9 5 }

References:

H. McClellan, James, Ronald W. Schafer, and Mark A. Yoder. DSP
First: A Multimedia Approach. New Jersey: Prentice Hall. 1998

Gutman, Tom. "We have convolution!!" 22 May 2000. Online

"Ana Kennedy" <nomail@nomail.com> wrote in message news:<s3Dbc.27315\$j57.1379993@news20.bellglobal.com>...
> Dear People,
>
> Does anyone know if it is possible to perform convolution of vectors with
> the HP48GX without the need of developing a specialized program for that ?
> If you are familiar with Matlab, I refer to convolution in the way that
> Matlab can do it:
>
> Thanks a lot for your responses, I appreciate that.
>
> Ana
```
 0

```rcobo@eng.morgan.edu (rcobo) wrote in message news:<639cb51.0404031601.5202987e@posting.google.com>...

<49G trick snipped>

>
> "Ana Kennedy" <nomail@nomail.com> wrote in message news:<s3Dbc.27315\$j57.1379993@news20.bellglobal.com>...
> > Dear People,
> >
> > Does anyone know if it is possible to perform convolution of vectors with
> > the

** HP48GX **

without the need of developing a specialized program for that ?
> > If you are familiar with Matlab, I refer to convolution in the way that
> > Matlab can do it:
> >
> > Thanks a lot for your responses, I appreciate that.
> >
> > Ana

rcobo, that trick will only work on a 49.  For a 48, you will need to
resort to
FFTs, something like (courtesy of Dave Arnett:)
(In : 2 vectors, not lists!)

<<

DUP2 SIZE EVAL SWAP
SIZE EVAL + 1 -         Calculate minimum vector size
LN 2 LN / .0000001 -
CEIL 2 SWAP ^           Making sure it is a power of 2
1 ->LIST DUP 4 ROLLD    RDM wants a single-element list
RDM SWAP ROT RDM        Expand both vectors

FFT                             Change A to freq domain
OBJ-> OBJ-> DROP ->LIST         Turn b(s) into a list
SWAP FFT                        Change B to freq domain
OBJ-> OBJ-> DROP ->LIST         Turn b(s) into list
*                               Multiply in freq domain
OBJ-> 1 ->LIST ->ARRY           Turn c(s) into vector
IFFT                            Change c to time tomain

>>

Cheers, Werner
I haven't tried the above program - merely copied it from some old
post:

```
 0