Hi, I’m trying to get a plot function in Julia. This is my code
function split(pt1,pt2::Number)
x = []
y = []
for i in 1:122
if matrix[1,i] > pt1 & matrix[1,i] < pt2
push!(x, matrix[1,i])
push!(y, matrix[2,i])
end
a = transpose(hcat(x,y))
Plots.scatter(a[1,:],a[2,:])
end
end
But when I used it, like >split(1,2), the error shows MethodError: no method matching &(::Int64, ::Float64). What’s wrong with this function?