Help for solving linear system that involves Bessel and Hankel Functions
조회 수: 1 (최근 30일)
이전 댓글 표시
I have tried starting with the following but I don't know how to proceed. Also, I don' t know to do it for the case of M different of N.
First I am defining the Bessel and Hankel Functions and their derivatives:
M= 10;
N = M;
scaled = 1; % parameter for Bessel functions (to avoid overflow for large M)
for m = 0:M
J_c(m+1) = besselj(m,k*r,scaled);
H_s(m+1) = besselh(m,2,k*r,scaled);
J_cp(m+1) = m*(besselj(m,k*r,scaled))./(k_c*a_c) - (besselj(m+1,k*r,scaled));
H_sp(m+1) = (1/2)*(besselh(m-1,2,k*r,scaled)-besselh(m+1,2,k*r,scaled));
댓글 수: 0
답변 (1개)
Torsten
2024년 1월 3일
편집: Torsten
2024년 1월 3일
What kind of functions are the P_m^n and Q_m^n ?
Fix a finite upper bound N for the loops instead of Inf. Then you have a linear system of equations in A_0,...,A_N,B_0,...,B_N. Set up the coefficient matrix Mat and the right-hand side vector rhs and solve it using \
Use 2*N as the new upper bound for the loops instead of Inf and check whether the solutions of your first computation (with N as upper bound) don't differ much from those of this computation.
Example for solving a linear system in MATLAB:
Mat = [1 3 ; 4 6];
rhs = [-2;5];
sol = Mat\rhs
댓글 수: 9
Torsten
2024년 1월 18일
편집: Torsten
2024년 1월 18일
If you determine the matrices and right-hand sides as shown above, you will end up with the correct problem size - either (N+1) x (N+1) for both A and B if you want to solve for A and B separately or 2*(N+1) x 2*(N+1) if you want to solve for A and B in one go.
참고 항목
카테고리
Help Center 및 File Exchange에서 Bessel functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!