Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Function evaluation' topicStudent Support Forum > General > Archives > "Function evaluation"

Next Comment >Help
Author Comment/Response
03/30/07 06:11am


I have a pure function of the form:

myfunction = Function[{x,y,z},f[x,y,z]]

Now I want to apply it to some data:


The problem is that when i want to evaluate f[x,y,z], I first want to perfom g[] on it. In other words, WHEN x,y and z get numerical values, I want to calculate g[f[x,y,z]]. I do not want to have this:

myfunction = Function[{x,y,z},g[f[x,y,z]]]

because it will try to evaluate g before any numerical values are assigned to the parameters. And function g in my case is such that it will only work if the parameters have numerical values, i.e. the previous will give errors.

So how can I do this? Could someone provide a quick answer, please.

Many Thanks!

URL: ,

Thread 'Function evaluation' is now CLOSED
Author Date Posted
Function evaluation AJM 03/30/07 06:11am
Re: Function evaluation yehuda ben-s... 03/30/07 1:57pm
Re: Function evaluation Gopinath Ven... 03/30/07 6:00pm
Next Comment >Help