X, Y, and E are longitude, latitude and elevation, respectively, on the same 86400 x 43200 grid. My goal is to reduce their resolution by 10 folder. Why does the below code keep throwing out the below error?
my script:
m = size(X);
Ind1 = [1:10:m[1]];
Ind2 = [1:10:m[2]];
X = X[Ind1, Ind2];
Y = Y[Ind1, Ind2];
E = E[Ind1, Ind2];
Error message:
**ERROR:** LoadError: ArgumentError: invalid index: StepRange{Int64, Int64}[1:10:86391] of type Vector{StepRange{Int64, Int64}}
Stacktrace:
[1] **to_index(** I::Vector{StepRange{Int64, Int64}} **)**
@ Base ./indices.jl:297
[2] **to_index(** A::Matrix{Float64}, i::Vector{StepRange{Int64, Int64}} **)**
@ Base ./indices.jl:277
[3] **to_indices**
@ ./indices.jl:333 [inlined]
[4] **to_indices**
@ ./indices.jl:324 [inlined]
[5] **getindex(** ::Matrix{Float64}, ::Vector{StepRange{Int64, Int64}}, ::Vector{StepRange{Int64, Int64}} **)**
@ Base ./abstractarray.jl:1170
[6] top-level scope
in expression starting at test.jl:35