Education: UK
"Oz" wrote in message
...
Gordon Couger writes
"Oz" wrote in message
...
Gordon Couger writes
Oz:
yes, but you has the x-y data so calculating the area is a simple
simpson's rule. NO recursion.
As I recall she ask for help and I looked at what she had and solved
the
problem with out thinking much about it. I saw triangles and
rectangles
and
summed them up. I used recursion because I was in the middle of a
hydrology
problem that I was solving recursively and it was the method that came
to
mind. This was something we did one afternoon after coffee. She had a
problem and I made it go away.
Sounds like maths education is a problem in the states, too.
Turning math into a computer algorithm is not always straight forward. It
wasn't a math problem it was a computer programming problem,
Hmmm.
Usually the maths bit of a program is the easiest and quickest bit.
It usualy is. But converting calculus in to code is not always straight
forward. Many time if you are working with a special case such as all
triangles and rectangles there is a simpler way than implementing the
solution for all cases.
Had it been a different day I may well have come up with a different
solution. She explained the problem I saw a simple way to solve it and I
did. Had I been working on something else I might have come up with a
different solution.
Gordon
|