How can I use symsum function to calculate this equation?

조회 수: 1 (최근 30일)
zheng-ning zhu
zheng-ning zhu 2020년 12월 21일
댓글: Rohit Pappu 2020년 12월 28일
As the file i attach, i want to caculate the equation.
The boundary typed on picture is wrong.
The correction is n=0 to n=1000.
And J-function is bessel function.
H-function is hankel funtion.
Beta*alpha=1.2*pi.
epsilon n=1 when n=0.
epsilon n=2 when n is not equal to 0.

답변 (1개)

Rohit Pappu
Rohit Pappu 2020년 12월 28일
%% Define constants
syms n phi lambda;
beta_alpha = 1.2*pi;
epsilon0 = 1; %% Epsilon when n=0
epsilon = 2; %% Epsilon when n~=0
%% Define equation for n = 1 to 100
f = epsilon*besselj(n,beta_alpha)*cos(n*phi)/besselh(n,2,beta_alpha);
%% Use symsum to find sum of series , f/2 case is when n = 0
sum = (2*pi/lambda)*(abs(symsum(f,n,[1,100])+symsum(f/2,n,[0,0]))^2);
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 12월 28일
Why symsum 0 to 0? Why not just use subs(f/2,n,0) ?
Rohit Pappu
Rohit Pappu 2020년 12월 28일
Edit : subs can be used to denote the n=0 term
%% Use symsum to find sum of series , f/2 case is when n = 0
sum = (2*pi/lambda)*(abs(symsum(f,n,[1,100])+subs(f/2,n,0))^2);

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by