View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
Default Iterative Equation

"Chris" wrote:
once "T" is solved for it is compared with the time value used
in the table that "i" was determined from.


Please forgive the misdirection in my previous responses. It appears that
you want to find the i in the table that corresponds to the smallest
difference between computed T and table T, not ABS(T-i).


I am trying to solve the equation
T=(11.4L^0.5)(K^0.52)(S^-0.318)(i^-0.38),
where "L, K & S" are constants and "i" is determined from a table
based on time. "T" is time in minutes.


As Bernard points out, your equation demonstrates a direct relation between
T and i. So I've been trying to figure out why the "time value used in the
table that i was determined from" would be any different from T computed by
the equation above.

I assume that you are dealing with something like the following situation.
You have a table of observed values of i measured at approximate times T.
Since these are real-world measurements, actual T and actual i might not
have exactly the algebraic relationship that we might expect based on the
equation for expected T. For example, acti might be +/-1% of the value that
we might expect (expi) when derived from actT by the equation above.

So I believe you are looking for acti whose actT is closest to expT. That
is, you want to find acti that corresponds to MIN(ABS(expT-actT)) or
MIN(ABS(expT-actT)/actT). I would opt for the latter, which is the minimum
relative difference.

If you agree, then I believe acti can be determined by a single formula
without iteration. However, for clarity, it might be useful to develop that
formula by using helper cells at first.

First, suppose that the constants L, K and S are in A2, B2 and C2
respectively. We can derive a constant A in D2:

=(11.4*A2^0.5)*(B2^0.52)*(C2^-0.318)

Thus, your equations become:

T = A * i^-0.38 --or-- T = A / i^0.38

i = (A / T) ^ (1/0.38)

Second, suppose that you have a table of 25 actT and corresponding acti
values in B5:C29; that is actT is B5:B29, and acti is in C5:C29.

Then expT, ABS(expT-actT) and ABS(expT-actT)/actT can be computed D5:F5 with
the following formulas, copied down through D29:F29:

D5: =$D$2*C5^-0.38
E5: =ABS(D5-B5)
F5: =E5/D5

Then the index MIN(ABS(expT-actT)/actT) and the corresponding acti can be
determined with the following array formulas[*]:

Min diff: =MATCH(MIN(F5:F29), F5:F29, 0)

acti: =INDEX(C5:C29, MATCH(MIN(F5:F29), F5:F29, 0))
[*] Enter an array formula by pressing ctrl+shift+Enter instead of just
Enter. In the Formula Bar, the formula will be surrounded by curly braces,
i.e. {=formula}. Note that you cannot type the curly braces yourself; Excel
inserts them to denote an array formula. If you make a mistake, select the
cell, press F2, edit as needed, then press ctrl+shift+Enter.

You can compute the corresponding acti without helper cells with the
following array formula:

=INDEX(C5:C29,
MATCH(MIN(ABS(B5:B29-D2*C5:C29^-0.38)/D2/C5:C29^-0.38),
ABS(B5:B29-D2*C5:C29^-0.38)/D2/C5:C29^-0.38, 0))

Hopefully you can leverage this paradigm for precisely what you are trying
to achieve, i.e. "an acceptable tolerance" between expT and actT.


----- original message -----

"Chris" wrote in message
...
I am trying to solve the equation
T=(11.4L^0.5)(K^0.52)(S^-0.318)(i^-0.38),
where "L, K & S" are constants and "i" is determined from a table based on
time. "T" is time in minutes. To solve the equation fully, once "T" is
solved for it is compared with the time value used in the table that "i"
was
determined from. If necessary, a new value of "i" is determined and the
equation is solved again. This is repeated until an acceptable tolerance
between "T" and the value used to determine "i" is reached. Is there an
easy
way to set this up in excel to run an iterative process with a table? Any
help would be greatly appreciated.