Let me rewrite this question, showing the original problem, as it is more subtle than the simple example I showed before using Sin[t]
. Here we go again.
When I write this:
foo[$s_,$t_]:=Module[{s=$s,t=$t,r},
r= OutputResponse[TransferFunctionModel[Evaluate[1/(s^2+2*s+1)],s],UnitStep[t],t];
Plot[Chop@First@r,{t,0,20}]
];
foo[s, t]
I get an empty plot. But when I write this
foo[s_,t_]:=Module[{r},
r= Chop@First@OutputResponse[TransferFunctionModel[1/(s^2+2*s+1),s],UnitStep[t],t];
Plot[r,{t,0,20}]
];
foo[s, t]
I do not get an empty plot.
My question is: Why first example above does not produce a plot?
I know it has to do with how 's' and 't', the free parameters, to the calls to TransferFunctionModel[]
and OutputResponse[]
. But I do not see exactly why that is.
thanks,