Is there a way one can store the instantaneous results of a probability distribution function (like the ones in Distributions.jl into a data structure? Here is how my code is set up right now attempting to do this:
dt = 10^(-5) # timestep
t = range(0, 1.0, step=dt)
f_s = zeros(length(t)+1)
f_s[1] = Uniform(0,1)
MethodError: Cannot `convert` an object of type Uniform{Float64} to an object of type Float64
Closest candidates are:
convert(::Type{T}, ::T) where T<:Number at C:\Users\Acer\AppData\Local\Programs\Julia-1.7.0\share\julia\base\number.jl:6
convert(::Type{T}, ::Number) where T<:Number at C:\Users\Acer\AppData\Local\Programs\Julia-1.7.0\share\julia\base\number.jl:7
convert(::Type{T}, ::Base.TwicePrecision) where T<:Number at C:\Users\Acer\AppData\Local\Programs\Julia-1.7.0\share\julia\base\twiceprecision.jl:262
The reason I ask this is because I plan to numerically solve a linear partial differential equation which essentially starts with some given distribution, but if one timesteps it enough, it is supposed to tend to a chi distribution with 3 degrees of freedom (if interested or seeking more information, I could share more details).