I have a function f[x_,y_,z_]:=Limit[g[x+eps,y,z],eps->0];
and I plot f[x,y,z]
in the next step. Earlier, I used to evaluate the limit and copy the expression in the definition of f
. I tried to make it all in one step. However, the evaluation of the Limit is done only when I try to plot f
. As a result, every time I change around the variables and replot, the limit is evaluated all over again (it takes about a min to evaluate, so it becomes annoying). I tried evaluating the limit first, and then doing f[x_,y_,z_]:=%
. But that doesn't work either. How do I get the function to evaluate the limit upon declaration?
相关问题
- Puzzled by Function body evaluation
- how to overload Times and Plus for matrix multipli
- AOSP Build TARGET_PRODUCT fails
- Modifying a Graphics3D object generated by Paramet
- Mathematica “AppendTo” function problem
相关文章
- histogram without vertical lines in Mathematica
- Entering data with Input[] in mathematica
- Using Fold to calculate the result of linear recur
- How should I write a function to be used in Apply
- NMinimize eats all memory b/c of unnecessary symbo
- Mathematica: set default value for argument to non
- how does mathematica determine which rule to use f
- Animate the movement of a point along the plot of
An alternative to Mr Wizard's solution is that you can also put the
Evaluate
in the function's definition:You can compare the two versions with the one without an
Evaluate
byTiming
thePlot
.The function you need is logically called
Evaluate
and you can use it within thePlot
command.Here is a contrived example:
Addressing your follow-up question, perhaps all you seek is something like
or possibly merely
It would be helpful if you would post a more complete version of your code.