Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6724281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:40:15+00:00 2026-05-26T09:40:15+00:00

I tried to implement bessel function using that formula, this is the code: function

  • 0

I tried to implement bessel function using that formula, this is the code:

function result=Bessel(num);


if num==0
    result=bessel(0,1);
elseif num==1
    result=bessel(1,1);
else
    result=2*(num-1)*Bessel(num-1)-Bessel(num-2);
end;

But if I use MATLAB’s bessel function to compare it with this one, I get too high different values.
For example if I type Bessel(20) it gives me 3.1689e+005 as result, if instead I type bessel(20,1) it gives me 3.8735e-025 , a totally different result.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:40:15+00:00Added an answer on May 26, 2026 at 9:40 am

    recurrence_bessel

    such recurrence relations are nice in mathematics but numerically unstable when implementing algorithms using limited precision representations of floating-point numbers.

    Consider the following comparison:

    x = 0:20;
    y1 = arrayfun(@(n)besselj(n,1), x);   %# builtin function
    y2 = arrayfun(@Bessel, x);            %# your function
    semilogy(x,y1, x,y2), grid on
    legend('besselj','Bessel')
    title('J_\nu(z)'), xlabel('\nu'), ylabel('log scale')
    

    comparison_plot

    So you can see how the computed values start to differ significantly after 9.

    According to MATLAB:

    BESSELJ uses a MEX interface to a Fortran library by D. E. Amos.

    and gives the following as references for their implementation:

    D. E. Amos, “A subroutine package for Bessel functions of a complex
    argument and nonnegative order”, Sandia National Laboratory Report,
    SAND85-1018, May, 1985.

    D. E. Amos, “A portable package for Bessel functions of a complex
    argument and nonnegative order”, Trans. Math. Software, 1986.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i tried to implement this code that move UIImageView's objects, i get a compiler
I have tried to implement this jQuery active menu code: http://docs.jquery.com/Tutorials:Auto-Selecting_Navigation $(function(){ var path
I have tried to implement the puts function.It in actual returns a value but
I tried to implement rtmps with red5 but was having an error that the
I tried to implement this captcha http://www.dracon.biz/captcha.php to a script But It seems really
I tried to implement the code found in this link location find The truth
I tried to implement __concat__ , but it didn't work >>> class lHolder(): ...
Anyone who has tried to implement RoutedCommands in WPF using M-V-VM has undoubtedly run
I once tried to implement Comet in PHP. Soon, I found that PHP is
I've searched the forum, and tried to implement the code in the threads I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.