using Plots
tk = [1,2,3,5,8]
y = [1. for i in 1:length(tk)]
pl = scatter(tk, y, title="Poisson train tk")
display(pl)
This works. However, I feel that there has to be a more Julian way of accomplishing this task. The comprehension list seems like an unnecessary expense, especially if tk if very large. Thanks.
The comprehension list… it is not quite clear to me why you would make y be equal to 1. for all values of tk, but if that is what you want, here are some other ways:
tk = [1,2,3,5,8]
#y = [1. for i in 1:length(tk)]
#y = ones(length(tk))
function f(t)
return 1.
end
#pl = scatter(tk, y, title="Poisson train tk")
pl = scatter(tk,f,title="Poisson train tk")