Help for solving linear system that involves Bessel and Hankel Functions
2 次查看(过去 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!