필터 지우기
필터 지우기

Approximation of Faddeeva function with Laplace Continued Fraction

조회 수: 2 (최근 30일)
Martin Doherty
Martin Doherty 2022년 3월 16일
편집: Martin Doherty 2022년 3월 17일
Dear Community,
I am attempting to approximate the Faddeeva function, , with complex argument (z) using the Laplace Continued Fraction shown below:
I wish to understand the variation in as additional "terms" i.e. continued fractions are used hence want to do a forward calculation starting with 1, 1/2, 2/2, 3/2...... n/2. I can compute the reverse calculation starting from n/2 and working backwards but wrap my head around how to do this the opposite way.
Thanks in advance!
  댓글 수: 1
Martin Doherty
Martin Doherty 2022년 3월 17일
편집: Martin Doherty 2022년 3월 17일
My current solution is to create an outer loop which increments the number of additional continued fractions whilst still solving "backwards" in an inner loop as shown below. It doesn't feel like the most efficient way of doing things mind you.
%% Laplace Continued Fraction
z = 20.0*exp(1i*5*pi/8)
r = 1.0;
nterms = 10;
i = 1;
for j = 1:nterms % Outer loop - iterate # of additional continued fractions
for k = i:-1:1 % Inner loop - backwards last term to first
if k == i % Last term only divided by z;
b = k/2/z;
else
b = k/2;
end
r = 1/(z-b*r);
F4_store(j) = 1i/sqrt(pi)*r; % Store each iteration
end
i = i+1;
r = 1.0; % Reset r for additional continued fraction
end

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by