Hi
I am trying to fill in an array such that information in in the middle. However, I find that I need to cast the Rational (or even Real for that matter) into an Int64 before I can actually use it to index into the array.
Any way I can do this better / avoid the ugly casts.
bump = (2/3 - 1/3 * cos.(ω * tInput))
inputSignal = zeros(t)
startIdx = Int64(length(t)//2 - length(tInput)//2)
inputSignal[startIdx:startIdx + length(tInput) - 1] = bump
Cheers!
J