Error handling in VBA
I'm in a bit of a rush at the moment but just this bit
What I was trying to say is that the code you restored performs linear
search,
That wasn't the intention, it was supposed to interpolate linearly between
to known X points and return the relative Y. Maybe I did something wrong,
will look again tomorrow.
Regards,
Peter T
"deltaquattro" wrote in message
...
On 4 Feb, 18:44, "Peter T" <peter_t@discussions wrote:
I assumed your Locate function (not posted) simply located the
appropriate
array element based on X, along the lines of what you had commented out.
[..]
Hi, Peter,
sorry for the misunderstanding he sure, I do linear interpolation.
What I was trying to say is that the code you restored performs linear
search, which is a confusing name for an algorithm for searching
ordered tables (so it's not directly related to linear interpolation).
It just means that, if I want to find the position of x in xArr where
xArr is an ordered array of N elements, I start from the first element
of xArr and compare each element with x in a loop. For increasing N,
this can be shown to be on average slower than a bisection search,
which is the one implemented in Locate. Obviously you couldn't know
that because I didn't include any details about Locate. My bad.
I'm not quite sure what you mean by profilers and dependency tree
graphers,
unless you mean something that will document your code along the lines of
a
flow-chart (I'm not aware of anything that does that).
Profiler = a code which tells me how much time the code spends in each
subroutine. Useful to find computation time bottlenecks.
Dependency (or call) tree grapher = a code which draws a tree, or
(even better) create an HTML file with hyperlinks, which shows who
calls who among the various subroutines, and maybe writes which are
the arguments for each procedure.
Maybe you might find
'MZ Tools' useful, which has a tool to document procedure callers, albeit
on
an individual basis.
That's excellent, but unluckily it works for one sub at a time as you
correctly point out.
Regards,
Peter T
Best Regards
Sergio
|