I'm quite new to Mathematica.
I have an issue defining cumulatively a function.
Let's say I have a waveform f[t] , and I want to create a function with many copies of it at different times. I have the list of arrival times in a vector v. I define my function T as follow
T[t_]:=0
For[i=1,i<=Length[v],i++,T[t]+=f[t-v[[i]]]]
Now, if I copy/paste the output of the last row and define a new function, I can plot it correctly, but if I call directly
Plot[T[t],{t,Min[v],Max[v]}]
My plot is empty. How's that?


Plotplots something continuous. You wantListPlot. And also, try to avoidForloops in Mathematica. – Marius Ladegård Meyer Jan 18 '16 at 14:36f[t]is actually continuos. So,Plotis the right one. The discrete nature of the signal lies in the starting times of every copy of the continuous waveform I want to add to my signal. To be more specific, let say I want to add many copy of aSin[t]translated in time by some given amounts, and then plot the result. Which is the best way to obtain it? Any suggestion on how to avoid theForloop? – Riccardo Buscicchio Jan 18 '16 at 14:46AxestryPlot[T[t], {t, 0, 1}, AxesOrigin -> {0, -1}]. You will see thatTis defines as monotonically zero. YourForstatement doesn't make much sense. I'm voting to close the question arises from a syntax mistake and is unlikely to help any future visitors – rhermans Jan 18 '16 at 22:35