Mathematica 9 is now available
Student Support Forum
Student Support Forum: ' Evaluating functions' topicStudent Support Forum > General > Archives > " Evaluating functions"

Next Comment >Help | Reply To Topic
Author Comment/Response
02/25/11 03:17am


I am creating a module to which a polynomial is being passed as a parameter. Then I need to assign F[x]= polynomial and then evaluate F[x] at several values. However, when I try printing a value of F[x] such as F[1], it is not being evaluated but the polynomial is displayed.

This is my code:

Test[polynomial_] := Module[{ F, x, g},
F[x_] := polynomial;
g = F[1];

Return [g];

Test[x^2 + 1];

URL: ,

Subject (listing for ' Evaluating functions')
Author Date Posted
Evaluating functions FM 02/25/11 03:17am
Re: Evaluating functions Patrick 02/25/11 09:24am
Re: Evaluating functions Isaac 02/25/11 10:28am
Re: Evaluating functions FM 02/26/11 2:24pm
Next Comment >Help | Reply To Topic