Relative Content

Tag Archive for julia

Returning arithmetic progressions from Vector in Julia

I am new to Julia, and currently stuck on extracting arithmetic progressions from a Vector{Int64} in Julia. Suppose I have a Vector like [1, 4, 5, 3, 9, 21, 16, 2, 22, 54, 17, 23], and I want to extract all consecutive sequences of length three or more. So, from the above, I want to get [1, 2, 3, 4, 5] and [21, 22, 23] as separate vectors. What’s the most efficient way to do this (Preferably without iteration for large vectors)?

Geo referencing in Julia

I have a heat map of a region over Los Angeles, stored as a matrix; however, the information is stored as pixels instead of as more convenient (lat, long). Is there any way I can incorporate this into the map?