Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.
test = OutputResponse[TransferFunctionModel[1/(1 + s), s], Exp[-(1/t)], {t, 0, 10}]

does not evaluate. If Exp[-(1/t)] is replaced by Exp[-t], it's fine.

Starting the numerical evaluation at t>0 does not help, either. (v9.0.1.0 on Mac OS). Thanks.

The same issue occurs with NDSolve:

NDSolve[{y'[t] + y[t] == Exp[-1/t], y[0] == 0}, y, {t, 0, 10}]

does not generate an interpolating function. Replacing Exp[-(1/t)] by Exp[-t] does.

share|improve this question
2  
This behavior seems rather strange, and some suspicious messages are produced. Starting from t == 1 doesn't help; changing Exp[-1/t] into Exp[-1/(t + 1*^-10)] does. Bug? –  Oleksandr R. May 4 at 19:53
    
Thanks! The t to t + eps trick does seem to work for both OutputResponse and NDSolve. –  John Bechhoefer May 4 at 23:01
1  
It probably should be noted that it does help to start from a value larger than zero for NDSolve (at least if one adopts the initial condition), but not for OutputResponse... –  Albert Retey May 6 at 15:44

1 Answer 1

This is just an observation and a workaround for now. Instead of using OutputResponse with {t,0,limit}, just use t.

This forces M to give an analytical solution using DSolve (not as fast as numerical with the limit, but it does avoid the problem you see with t=0. This is why NDSolve also fails, since when using the limit, NDSovle is used vs. DSolve

sol = First@OutputResponse[TransferFunctionModel[1/(1 + s), s], Exp[-(1/t)], t]

Mathematica graphics

Plot[Evaluate[sol], {t, 0, 10}]

Mathematica graphics

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.