Re: function not evaluating question tia sal2
- To: mathgroup at smc.vnet.net
- Subject: [mg87969] Re: function not evaluating question tia sal2
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Mon, 21 Apr 2008 06:38:06 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <fuhf9h$ia3$1@smc.vnet.net>
ratullochjk2 at gmail.com wrote: > function not evaluating question tia sal2 > > Greetings All > > I trying to evaluate this function to a numerical value but it doesn;t > seem to work I replace the expression with t sin t and it works what > am I doing wrong? > > In[240]:= f = Function[{t}, 0.680232 Cos 6.28319 [t]] > Out[240]:= Function[{t}, 0.680232 Cos 6.28319[t]] > > > In[241]:= Evaluate [f[2.5]] > Out[241]:= 0.680232 Cos 6.28319[2.5] > > Why am I not getting a numerical value? tia sal2 > It seems you have misplaced a square bracket. (Note that Evaluate is not required here.) In[1]:= f = Function[{t}, 0.680232 Cos[6.28319 t]]; f[2.5] Out[2]= -0.680232 Regards, -- Jean-Marc