Functions inside list
- To: mathgroup at smc.vnet.net
- Subject: [mg70351] Functions inside list
- From: "akil" <akomur at wanadoo.nl>
- Date: Sat, 14 Oct 2006 03:06:40 -0400 (EDT)
I have a function berekenMaxWidth[beta_] which only gives the correct output
when beta is numeric so I use
maxWidth[beta_?NumericQ]:=berekenMaxWidth[beta]. Otherwise I get incorrect
results, for instance when trying to plot berekenMaxWidth[beta].
This function represents a curve that will be of importance between two
x-values.
My problem arises when I try to give the function to a list of the shape
{{xLow,xHigh},relevant curve function}.
If I do: {{xLow,xHigh},maxWidth[beta]} , I get {{xLow,xHigh},Infinity} in my
list instead of the function. This is incorrect. I need the list for
instance to find intersections between curves in the x-domain. So for the
input in the list I need the correct function to be returned instead of
Infinity.
So how can I give along the function to the list so that it works correctly?