Laveling solution in package. Problems with context
- To: mathgroup at smc.vnet.net
- Subject: [mg31193] Laveling solution in package. Problems with context
- From: guillerm at usal.es
- Date: Wed, 17 Oct 2001 05:35:15 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I have a package such as the follow (it is an easy example of the real package).
BeginPackage["Test`Test`"]
fTest::"usage" = "fTest gives solution."
Options[q] = {AI1 -> 0.3 AI, AI2 -> 0.6 AI, AI3 -> 0.1 AI};
Begin["`Private`"]
fTest[int_List, t_, t1_, opts___Rule] := Module[{ic, sol},
ic = {AI1, AI2} /.{opts} /. Options[q];
sol = Dot[ic, int];
Thread[{q1[t1], q2[t1]} -> sol]];
End[]
Protect[fTest];
EndPackage[]
I test the package
in[]:=fTest[{a1 Exp[-b1 t], a2 Exp[-b2 t]}, t, t1, AI3 -> 0.9 AI]
out[]:={Test`Test`Private`q1[t1] -> (0.3*a1*AI)/E^(b1*t) + (0.6*a2*AI)/E^
(b2*t), Test`Test`Private`q2[t1] -> (0.3*a1*AI)/E^(b1*t) + (0.6*a2*AI)/E^(b2*t)}
Of course, I receive the message that q1[t], q2[t] are defined in a private
context. How can I fix this problem?.
I know that using fTest[int_List, t_, t1_, q1_, q2_, opts___Rule] the problem
is solved but I can avoid write q1 and q2 in fTest.
But I wish that the solution will be labeled with q1[t],
q2[t].
---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/