Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Functions inside list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70461] Re: Functions inside list
  • From: "akil" <akomur at wanadoo.nl>
  • Date: Tue, 17 Oct 2006 02:58:21 -0400 (EDT)
  • References: <egq2rf$83m$1@smc.vnet.net>

In package.m I do now:

maxWidthInternal[beta_?NumericQ]:=berekenMaxWidth[beta,linkerOVCone,cy,dy,centerOfMassx,centerOfMassy,rcAB,ax,ay,rcCD,cx,dx,rcCD,RightVBi,boundVab,bx,by,partList[[sp]],vdomein];

where all values except beta are known as can be seen in the package they 
are used. berekenMaxWidth is a module defined in the same package as 
maxWidthInternal is called. maxWidthInternal  is called by anoter Module in 
the same package.

This solves my problems inside the package they are used, but now I get 
problems later on. The list contains 
{{x1,x2},Global`Private`maxWidthInternal[Global`Private`beta]} now, but as 
many can see when I search for intersections later on, or when I try to Plot 
it later using the list in another package for instance, I only have the 
reference "Global`Private`maxWidthInternal[Global`Private`beta]" but this 
does not know all the other variables seen above. These variables change for 
each time maxWidthInternal is called.

Is there any way I can give it those values along so that it will work in 
other packages later on?



"akil" <akomur at wanadoo.nl> schreef in bericht 
news:egq2rf$83m$1 at smc.vnet.net...
>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?
>
>
> 



  • Prev by Date: Re: Faster ways to unionize intersecting sets?
  • Next by Date: Re: Re: variable metric method automatic gradient yields Indeterminate
  • Previous by thread: Re: Functions inside list
  • Next by thread: RE: Re: Functions inside list