i need series representation for the equation of erfc(x) and maching with it in plot
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
sura
el 22 de Sept. de 2022
Comentada: Torsten
el 24 de Sept. de 2022
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 )
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1133710/image.gif)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1133715/image.gif)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1133720/image.gif)
0 comentarios
Respuesta aceptada
Chunru
el 23 de Sept. de 2022
x = 0.5;
format long
erfc(x)
for n=1:20
y(n) = erfc_by_series(x, n);
end
y'
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 comentarios
Torsten
el 24 de Sept. de 2022
erfc(x) is 1 - 2/sqrt(pi)*s.
Or didn't you look at what you posted as the first representation of erfc(x) ?
Más respuestas (0)
Ver también
Categorías
Más información sobre Error Functions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!