I want to use
gf[x_, y_] :=
Module[{x1, x2, xtst, fnw, f1, xnw}, xtst = Total[x]/2;fnw =
LAcr[xtst, 1/12., LAI, LBI, AF, a, b, c, d,
400000.,a, y];
f1 = LAcr[x[[1]], 1/12., LAI, LBI, AF, a, b, c, d,
400000., a, y]];
Return[If[Sign[fnw] == Sign[f1], {xtst, x[[2]]}, {x[[1]], xtst}]];]
as the input to
NestWhile[
gf, {500., 50000.}, #[[2]] - #[[1]] > 0.0001 &]
where the return parameters are {xlowerfinal,xupperfinal} are the final values of { #[[1]],#[[2]]} and the value of y is to be supplied before entering NestWhile by using the Table function to introduce a list of y values. Can one convert a a 2 variable (here x, y) function into a 1 variable function of x by automatically introducing the y values using Table? Or is there some way of making ListWhile know which variable (x) to use?