How do I pass a function as an argument to another function or program?

1,385 views
Skip to first unread message

fb39ca4

unread,
Dec 10, 2011, 12:36:09 PM12/10/11
to tinspire
I am trying to make functions that calculate the Lower, Upper, and
Middle Riemann Sums and the Trapezoidal Sum of a function. How do I
pass the input function to my function? Simply typing it in as an
argument gives me a "variable not defined" error.

Andy Kemp

unread,
Dec 10, 2011, 12:58:28 PM12/10/11
to tins...@googlegroups.com
Can you post your function, as what you have described should work…


--
To post to this group, send email to tins...@googlegroups.com
To unsubscribe send email to tinspire+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
The tns documents shared by group members are archived at
https://sites.google.com/site/tinspiregroup/classroom-news/welcome-abouttime

Sean Bird

unread,
Dec 10, 2011, 2:13:21 PM12/10/11
to tins...@googlegroups.com
I commend you for your efforts and learning to program, but if you want to see what I put together, take a look at "area" on our Google Group Website

https://sites.google.com/site/tinspiregroup/assignments/area.tns?attredirects=0&d=1

- Sean Bird

Steve Arnold

unread,
Dec 10, 2011, 2:58:10 PM12/10/11
to tins...@googlegroups.com
I guess from what you describe that you are using the nonCAS Nspire, and this does not support using anything with an undefined variable as the argument to a function.

What you could do is to have the user enter the function as f1(x) in the graphing screen, the only place in nonCAS that you CAN use symbolic variables. Then in your function, call f1.


With best wishes,

Steve
_________________________________

Dr Stephen Arnold
Educational Technology Consultant
Compass Learning Technologies

T3 Fellow, Teachers Teaching with Technology, Australia

Office: +61 2 4232 2080
Mobile: +61 4 0175 3834
US: +1 50 88 69 4380
UK: +44 79 2425 1196

Web: compasstech.com.au
_________________________________
Sent from my iPad

--

Jim Fullerenex

unread,
Dec 10, 2011, 10:53:42 PM12/10/11
to tins...@googlegroups.com
I'm not sure what you mean by "pass the input function to my function". What exactly is an "input function"?

Best,
Jim



2011/12/11 fb39ca4 <fb3...@gmail.com>

John Hanna

unread,
Dec 11, 2011, 10:58:23 AM12/11/11
to tins...@googlegroups.com

 

Does this help?

 

     John Hanna

     jeh...@optonline.net

     www.johnhanna.us

     T3 - Teachers Teaching with Technology

     "A cowchip is paradise to a fly."

 


image001.jpg

matin

unread,
Dec 11, 2011, 11:36:27 AM12/11/11
to tins...@googlegroups.com
i need ac adaptor and extra battry for ti nspire cx cas please guide me thanks

 
  

matin

unread,
Dec 11, 2011, 12:30:39 PM12/11/11
to tins...@googlegroups.com
i need ac adaptor and extra battery for ti nspire cx cas please let me know where can found

  

Sean Bird

unread,
Dec 12, 2011, 7:34:43 AM12/12/11
to tins...@googlegroups.com
In the US and Canada, there is a TI store that you can get the ac wall adapter and the rechargeable battery for $15 http://epsstore.ti.com/OA_HTML/ibeCCtpItmDspRte.jsp?section=11092&item=93907&JServSessionIdrootdlek21=b8a2z8o3d1.n6LzoN8L/AzOnMTOogTxpQOUtxCLbx0Ka0--
Reply all
Reply to author
Forward
0 new messages