필터 지우기
필터 지우기

i need series representation for the equation of erfc(x) and maching with it in plot

조회 수: 1 (최근 30일)
i need series representation for the equation of erfc(x) and maching with it in plot. there are series representation. taylor series is series expansion. in wolfram website (www.wolframalpha.com) you can write series erfc(x). you will find three or more series representation. i need one of these match with erfc(x) with function by k not x. like equation imges below (which one is good for matching plot figure )

채택된 답변

Chunru
Chunru 2022년 9월 23일
x = 0.5;
format long
erfc(x)
ans =
0.479500122186953
for n=1:20
y(n) = erfc_by_series(x, n);
end
y'
ans = 20×1
0.482826215081223 0.479300030184050 0.479509922142215 0.479499719060915 0.479500136459696 0.479500121743713 0.479500122199208 0.479500122186648 0.479500122186960 0.479500122186953
function y= erfc_by_series(x, n)
t = x; % term inside sum for k=0
s = t;
for k=1:n
t = -t*x.^2/k;
s = s + t/(2*k+1);
end
y = 1 - 2/sqrt(pi)*s;
end
  댓글 수: 16
sura
sura 2022년 9월 23일
good that is for erfc(x)
it should the y = 1 - 2/sqrt(pi)*s; make the same figure
Torsten
Torsten 2022년 9월 24일
erfc(x) is 1 - 2/sqrt(pi)*s.
Or didn't you look at what you posted as the first representation of erfc(x) ?

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by