Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Complementary Error functions

Subject: Complementary Error functions

From: Jeremy

Date: 13 Jul, 2011 16:16:13

Message: 1 of 3

Hi,

I'm trying to compute the following complementary error function:

I(x,t)=(1/2)*(Io)*erfc((x/(2t)*(1/sqrt(d)))

where x is a distance, t is the time, and D is a dilution constant (which is what I'm trying to calculate). How would I go about doing this?

Subject: Complementary Error functions

From: Steven_Lord

Date: 13 Jul, 2011 17:07:03

Message: 2 of 3



"Jeremy " <morrisje@william.jewell.edu> wrote in message
news:ivkgcd$s5f$1@newscl01ah.mathworks.com...
> Hi,
>
> I'm trying to compute the following complementary error function:
>
> I(x,t)=(1/2)*(Io)*erfc((x/(2t)*(1/sqrt(d)))
>
> where x is a distance, t is the time, and D is a dilution constant (which
> is what I'm trying to calculate). How would I go about doing this?

So you know I(x, t), x, t, and Io and want to compute d? Rewrite your
equation so it's in the form F(d) = 0 [where F can also depend on I(x, t),
x, t, and Io] then use FZERO.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Complementary Error functions

From: Roger Stafford

Date: 13 Jul, 2011 18:59:27

Message: 3 of 3

"Steven_Lord" <slord@mathworks.com> wrote in message <ivkjbn$827$1@newscl01ah.mathworks.com>...
> "Jeremy " <morrisje@william.jewell.edu> wrote in message
> news:ivkgcd$s5f$1@newscl01ah.mathworks.com...
> > I'm trying to compute the following complementary error function:
> >
> > I(x,t)=(1/2)*(Io)*erfc((x/(2t)*(1/sqrt(d)))
> >
> > where x is a distance, t is the time, and D is a dilution constant (which
> > is what I'm trying to calculate). How would I go about doing this?
>
> So you know I(x, t), x, t, and Io and want to compute d? Rewrite your
> equation so it's in the form F(d) = 0 [where F can also depend on I(x, t),
> x, t, and Io] then use FZERO.
- - - - - - - -
  If as Steve says, you know I, x, t, and Io, then you can solve for d. However, you don't really need to use fzero because the erfcinv function is available. The equation

 I=Io/2*erfc(x/(2t)/sqrt(d))

converts to this:

 d = (x/2/t/erfcinv(2*I/Io))^2

Of course you must have 0 <= I <= Io.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us