I have a function in scope that returns an expression with a variable t
BeginPackage["Pkg`"]
F1::usage = "";
Begin["scope`"]
F1[x_] := Sin[t + x];
End[]
EndPackage[]
When I use it from outside
In[159]:= F1[2]
Out[159]= Sin[2 + scope`t]
I can Replace scope
tto
t` outside
In[169]:= F1[2] /. scope`t -> t
Out[169]= Sin[2 + t]
But is there any way to replace it from the inside of Package ?
I have tried replacing t
with "t"
BeginPackage["Pkg`"]
F1::usage = "";
Begin["scope`"]
F1[x_] := Sin[t + x] /. t -> "t";
End[]
EndPackage[]
This looks like it works
In[223]:= F1[2]
Out[223]= Sin[2 + t]
However it is actually Sin[2 + "t"]
So I cannot plot it with variable t
Plot[F1[2], {t, 0, 200}]
doesn't plot anything