MathGroup Archive 2001

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

Search the Archive

Unappropiate context in a package

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29570] Unappropiate context in a package
  • From: guillerm at gugu.usal.es (Guillermo Sanchez)
  • Date: Mon, 25 Jun 2001 20:42:25 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I have the following expresion:

qContinuousTest1[acute_, conti_, t2_] := Module[{tau, a, c, r, t1}, 
a[t1_] = acute /. t -> t1; c[t1_] = conti /. t -> t1; 
r = Integrate[ExpandAll[a[tau]]*c[t1 - tau], {tau, 0, t1}]; r /. t1 ->
t2];
Simplify[qContinuousTest1[Exp[(-k)*t], 0.1, 2]]

(*It work fine:*)

Out[] := (0.1 - 0.1/E^(2*k))/k

Now I wish to use the same expresion in a package but some thing is in
unpropiate context. I thing is t, but how I can correct this problem.

Note: "acute" and "conti" are always functions of t.

Thanks

BeginPackage["test`test`"]

qContinuousTest::usage = "qContinuous[test]"

Begin["`Private`"]

qContinuousTest[acute_, conti_, t2_] := Module[{tau, a, c, r, t1}, 
a[t1_] = acute /. t -> t1; c[t1_] = conti /. t -> t1; 
r = Integrate[ExpandAll[a[tau]]*c[t1 - tau], {tau, 0, t1}]; r /. t1 ->
t2];
End[]

Protect[qContinuousTest]; 

EndPackage[]

Simplify[qContinuousTest[Exp[(-k)*t], 0.1, 2]]

Out[]:= 0.2/E^(k*t)


  • Prev by Date: Re: Mathematica and Powerpoint
  • Next by Date: Re: Fitting data
  • Previous by thread: Re: overlay imported picture with Mathatmatica calc
  • Next by thread: Re: Unappropiate context in a package