Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

convolution integral and graphs with HP 50g

555 views
Skip to first unread message

supergems

unread,
May 8, 2009, 4:02:10 AM5/8/09
to
To observe the convolution (http://mathworld.wolfram.com/
Convolution.html) between two signals one can write the convolution
integral restricted to a certain range and try to plot. For example,
the convolution of a Gaussian with itself, one can write it like
this:

'\.S(-3;3;EXP(-Y^2)*EXP(-(X-Y)^2);Y)'

and plot it through SYMB->GRAPH->PLOT->ERASE and then DRAW. I found
this example on http://www.caffnib.co.uk/calculators/calculators.html.

1)

With the official ROM C-2.09, my HP 50g takes about 15 minutes to plot
the integral convolution; it's too slow! Is there a faster way?

While with the new official ROM C-2.15, my HP 50g gets the following
message, when I try to plot the graph as before:
"Error: Bad Argument Type". But if I write the integral convolution
through the PLOT-FUNCTION window [LS] + [F1]:

Y1(X)='\.S(-3;3;EXP(-Y^2)*EXP(-(X-Y)^2);Y)'

then my HP 50g manages to plot the integral convolution! It's a bit
strange... Is it a bug?

2)

When I try to plot the absolute value (http://en.wikipedia.org/wiki/
Absolute_value) of certain functions only valid for x> 0, I get a
graph with a branch also for x<0, both ROM C-2.15 and C-2.09. For
example:

'ABS(LN(X))'
'ABS(1-1/\v/X)'

It's a bug! :-(

Cheers,
Simone.

Arnaud Amiel

unread,
May 8, 2009, 6:03:29 AM5/8/09
to
On May 8, 9:02 am, supergems <Simone.Cer...@gmail.com> wrote:


>
> When I try to plot the absolute value (http://en.wikipedia.org/wiki/
> Absolute_value) of certain functions only valid for x> 0, I get a
> graph with a branch also for x<0, both ROM C-2.15 and C-2.09. For
> example:
>
> 'ABS(LN(X))'
> 'ABS(1-1/\v/X)'
>
> It's a bug! :-(
>

It is not a bug, the manual (AUR: http://www.hpcalc.org/details.php?id=6374
) for ABS says:
(x,y) → \v/(x2 + y2)

And for LN and SQRT, it goes into quite some details about what are
their values for negative numbers.

As to the convolution part of your post, I will have to check

Arnaud

John H Meyers

unread,
May 8, 2009, 6:17:04 AM5/8/09
to
On Fri, 08 May 2009 03:02:10 -0500:

> When I try to plot the absolute value (http://en.wikipedia.org/wiki/
> Absolute_value) of certain functions only valid for x> 0,
> I get a graph with a branch also for x<0, both ROM C-2.15 and C-2.09

> For example:

> 'ABS(LN(X))'
> 'ABS(1-1/\v/X)'

> It's a bug! :-(

-2. @ Real number
LN @ (.69314718056,3.14159265359) Complex number
ABS @ 3.21715051171 Real number

However, the special black tape used by "Click and Clack, the Tappet Brothers"
to cover the "Check Engine" (and other dashboard) lights on cars,
can also be used to cover the left half of the calculator screen :)

http://www.cartalk.com/content/columns/Archive/2000/December/01.html

http://www.npr.org/templates/story/story.php?storyId=2100834

[r->] [OFF]

supergems

unread,
May 8, 2009, 10:33:51 AM5/8/09
to
Arnaud and John thank you very much, I understood

Veli-Pekka Nousiainen

unread,
May 9, 2009, 11:28:07 PM5/9/09
to
"supergems" <Simone...@gmail.com> kirjoitti
viestiss�:3b3b5eec-05bb-42a0...@r36g2000vbr.googlegroups.com...

> To observe the convolution (http://mathworld.wolfram.com/
> Convolution.html) between two signals one can write the convolution
> integral restricted to a certain range and try to plot. For example,
> the convolution of a Gaussian with itself, one can write it like
> this:
>
> '\.S(-3;3;EXP(-Y^2)*EXP(-(X-Y)^2);Y)'
>
> and plot it through SYMB->GRAPH->PLOT->ERASE and then DRAW. I found
> this example on http://www.caffnib.co.uk/calculators/calculators.html.
>
> 1)
>
> With the official ROM C-2.09, my HP 50g takes about 15 minutes to plot
> the integral convolution; it's too slow! Is there a faster way?

I think that you are evaluating the whole integral
over and over again each time a point is plotted
If you could find a symbolic solution first and plot that
then it would be like 65 * faster to plot

(depending on the complexity of the f and f'
and of how long it takes to find the symbolic solution 1st
if that is possible - it depends...)
--
VPN


supergems

unread,
May 12, 2009, 5:29:09 AM5/12/09
to
On 10 Mag, 05:28, "Veli-Pekka Nousiainen"
<velipekka.nousiai...@saunalahti.fi> wrote:
> "supergems" <Simone.Cer...@gmail.com> kirjoitti
> viestissä:3b3b5eec-05bb-42a0-a55c-6933382c4...@r36g2000vbr.googlegroups.com...

>
> > To observe the convolution (http://mathworld.wolfram.com/
> > Convolution.html) between two signals one can write the convolution
> > integral restricted to a certain range and try to plot. For example,
> > the convolution of a Gaussian with itself, one can write it like
> > this:
>
> > '\.S(-3;3;EXP(-Y^2)*EXP(-(X-Y)^2);Y)'
>
> > and plot it through SYMB->GRAPH->PLOT->ERASE and then DRAW. I found
> > this example onhttp://www.caffnib.co.uk/calculators/calculators.html.

>
> > 1)
>
> > With the official ROM C-2.09, my HP 50g takes about 15 minutes to plot
> > the integral convolution; it's too slow! Is there a faster way?
>
> I think that you are evaluating the whole integral
> over and over again each time a point is plotted
> If you could find a symbolic solution first and plot that
> then it would be like 65 * faster to plot
>
> (depending on the complexity of the f and f'
> and of how long it takes to find the symbolic solution 1st
> if that is possible - it depends...)
> --
> VPN

The problem is that, in general, calculate the convolution
symbolically is pretty difficult!

supergems

unread,
May 12, 2009, 10:40:04 AM5/12/09
to
I have find only this program for convolution: Convolucion 1.0
(Spanish) at http://www.hpcalc.org/details.php?id=6631

mjc

unread,
May 13, 2009, 12:21:09 PM5/13/09
to
On May 12, 7:40 am, supergems <Simone.Cer...@gmail.com> wrote:
> I have find only this program for convolution: Convolucion 1.0
> (Spanish) athttp://www.hpcalc.org/details.php?id=6631

In this particular case, I think a general convolution is too much.

Let f(x) = int(exp(-y^2 - (y-x)^2) dy) (indefinite integral).

After some algebra, modulo mistakes,

f(x) = exp(-x^2/2) int(exp(-2(y-x/2)^2).

With some scaling and shifting, this becomes the standard gaussian
integral,
which is already in progress:)

supergems

unread,
May 15, 2009, 5:49:04 AM5/15/09
to
Fourier transform of a gaussian is a gaussian;
Fourier transform of a integral convolution between two gaussian is a
simple product of two Fourier transform gaussian that is gaussian
again;
Then finally inverse Fourier transform of a gaussian is a
gaussian ;-) .

Simone.

0 new messages