[Edit- I found a post on programming functions further down the forum and will be working with the info in there]
I'm a total beginner and actually grinding it out on a TI-89. The program is a (hopefully) simple implementation of the midpoint rule for approximating the value of an integral. The first of two basic obstacles is bringing in the function being integrated in a way that allows it to use a list as its mathematical variable.. I am hopeful that once this is clear to me I'll be able to work out the list dimension mismatch problems I'm having on my own.
My first attempt for getting the inputs was using the Request command and converting the strings to numerical variables, which would have been optimum due to the sense of user-friendliness. Once I couldn't make the function input work properly using Request, I tried the Input command. Likewise no dice. Here's the pertinent part of the code:
bold text
: Input "function",g
:Define g(x)=g
(creates a partition of the interval of interest and stores it as list1)
:Define g(list1)=list2
So, the above doesn't work and I think it's the function's problem rather than the list's problem. I'm looking for the output in the list editor and list1 is fine but list2 has a "data type" error.
I tried using FUNC, ENDFUNC but it won't accept the numerical variable, it needs explicit direction. I don't want to apply a function that lives within the program… I want to apply the user's own function.
Thanks for any thoughts whatsoever!