Solved

A simple question

Posted on 2000-02-15
4
213 Views
Last Modified: 2010-04-15
I have been asked to use the cephes math library to write a C program which will generate the values of the zeroth order Bessel function [j0(x)] for 50 values of x evenly spaced in the interval 0 < x < 10. But I am totally confuse about this question. What is that mean? Please help. Thanks !
0
Comment
Question by:clo1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 10

Accepted Solution

by:
rbr earned 10 total points
ID: 2526061
Assume that you have a function j0 which generates the bessel function.


Then you have to divide the interval (0,10) in 50 steps

int n=50;
double a=0,b=10,x;
for (i=1;i<=n;i++) {

    x=(b-a)*i/(n+1)+a;

    printf ("Bessel for x=%f:%f\n",x,j0(x));
}
0
 
LVL 10

Expert Comment

by:rbr
ID: 2526068
if you need the boundaries too (0<=x<=10) use
for (i=0;i<n;i++) {

x=(b-a)*i(n-1)+a;
0
 
LVL 10

Expert Comment

by:rbr
ID: 2526070
sorry
x=(b-a)*i/(n-1)+a;
0
 
LVL 2

Author Comment

by:clo1
ID: 2526124
Oic, I finally know what it means now. But I would like to know where do you get the information on how to use the bessel function?? Cause I have try to read the double.doc file in the cephes's doc directory, but no clue. Anway, Thanks very much !!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to creat good software interface ? 1 77
Computer slow / BSOD 10 79
C qsort compare function issue 6 70
Excel formula to calculate ID # 4 44
Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question