Error exercise roots of the bessel function

조회 수: 2 (최근 30일)
Cristian Segura Bidermann
Cristian Segura Bidermann 2021년 7월 22일
댓글: Walter Roberson 2021년 7월 22일
Could someone help me find the mistake I am making?
The exercise is as follows:
My code is the following:
I don't know why my root values of the Bessel function are bad.
  댓글 수: 3
Cristian Segura Bidermann
Cristian Segura Bidermann 2021년 7월 22일
How should the values be then?
Walter Roberson
Walter Roberson 2021년 7월 22일
You assign to r(6) first using 4 as the starting approximation. If everything goes well, you will get the root that is close to 4.
You assign to r(5) second using 7 as the starting approximation. If everything goes well, you will get a root that is close to 7. If all went well, this root will be after the root that was near 4, so it should be after the one for 4 in the r vector. But you stored it into r(5) which will be before the one for 4 in the r vector.
Why are you storing into r(6) then r(5) then r(4) ?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Bessel functions에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by