1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>ERFC Complimentary Error Function
</TITLE>
</HEAD>
<BODY>
<H2>ERFC Complimentary Error Function
</H2>
<P>
Section: <A HREF=sec_mathfunctions.html> Mathematical Functions </A>
<H3>Usage</H3>
Computes the complimentary error function for real arguments. The <code>erfc</code>
function takes only a single argument
<PRE>
y = erfc(x)
</PRE>
<P>
where <code>x</code> is either a <code>float</code> or <code>double</code> array. The output
vector <code>y</code> is the same size (and type) as <code>x</code>.
<H3>Function Internals</H3>
The erfc function is defined by the integral:
<P>
<DIV ALIGN="CENTER">
<IMG SRC="erfc_eqn1.png">
</DIV>
<P>
and is the integral of the normal distribution.
<H3>Example</H3>
Here is a plot of the <code>erfc</code> function over the range <code>[-5,5]</code>.
<PRE>
--> x = linspace(-5,5);
--> y = erfc(x);
--> plot(x,y); xlabel('x'); ylabel('erfc(x)');
</PRE>
<P>
which results in the following plot.
<P>
<DIV ALIGN="CENTER">
<IMG SRC="erfc1.png">
</DIV>
<P>
</BODY>
</HTML>
|