1

I need to fit some data to the von Mises distribution: enter image description here

but before to do that I would like to plot this function first in gnuplot. I want to reproduce the curves for different k values, you can see them in wikipedia: https://en.wikipedia.org/wiki/Von_Mises_distribution.

My problem relies on the term Io(k) which is the modified Bessel function of order 0. Io(k)=Jo(ik), where Jo is the bessel function for n=0, basically from this equation:enter image description here.

In gnuplot one can plot Jo(k) with the function

> besj0(k)

but I cannot:

besj0(i*k) when the argument is imaginary.

Does anybody have an idea how to plot the von Mises distribution in gnuplot?

Wara
  • 304
  • 2
  • 11
  • @andyras, do you have any suggestion?:) – Wara Apr 04 '18 at 16:00
  • This is essentially the same question as [this one](https://stackoverflow.com/questions/22506609/bessel-j-function-of-complex-argument-in-gnuplot), which unfortunately doesn't have a complete answer. The answer to [this question](https://superuser.com/questions/851732/how-to-use-mathematical-functions-not-built-in-in-gnuplot) has a potential workaround. – user8153 Apr 04 '18 at 16:36

1 Answers1

0

You can use the development version of Gnuplot, which currently supports modified Bessel functions of the first kind. Specifically, I0 is available as besi0.

ewcz
  • 12,819
  • 1
  • 25
  • 47