From: Blaine on
\> If you already have the complete set of function values, you could use
> isosurface, or you could extract the coordinates from the complete surface list.
>
> If you do not already have the complete set of values, then what _do_ you have
> available that would be suitable for interpolating? Is the function relatively
> smooth? Is it symmetric (which would allow you to cut down the search
> according to the number of axes of symmetry) ?
>
\> It is not able to process vectors now, but is it plausible that we might be
> able to assist you in vectorizing it?

The function produces a single vlaue at each point. If you only take values at, say .75 (and i use a tolerance of .005), they constitute smooth curve that looks like a hot air balloon
From: Walter Roberson on
Blaine wrote:
> It has to do with fire control. The function basically calculates a hit
> percentage based on azimuth bias (x), elevation bias (y), and
> scatter(z), using cumulative normal distributions. The cumulative normal
> distribution is calculated as:
>
> NORMDIST(x,mean,std_dev) =
> (1/2)*(erf((v-mean)/(sqrt(2)*std_dev))-erf(((-inf)-mean)/(sqrt(2)*std-dev))

It appears to me that that should be vectorizable over any one of x or mean or
std_dev without any changes, and should be vectorizable for pairs or triples
of those by replacing the / with ./

> For the purposes of my question lets
> just say my function, as stated in my code above, is:
>
> NORMDIST(2,az_bias,scatter) - NORMDIST(3,el_bais,scatter)
>
> and i want this computation performed on every point specified by
> az_bias = 0:0.1:2 (x)
> el_bias = 0:0.1:3 (y)
> scatter = 0:0.1:6 (z)

The two normdist terms are independent over the bias so whichever one you
choose to make the outside loop, you could pull out of the inner loop as a
constant. And as indicated above, I believe that you should be vectorize on
either of the bias or scatter, so I believe you could reduce it to a doubly
nested loop instead of a triply nested loop. As your arrays are not big, you
could probably ndgrid() and vectorize the whole normdist call, if you make the
change to ./ from / .