I want my code to display all the five results after each iteration and also select the maximum among the 5 results and display it. When I run it I only get one output. All five results are not showing. I have an array of five elements each. I am writing a code to take an element and find the radius using the formula in my code at each of this values, I have 5 values in each array. Any help will be appreciated please. Attached is the code.
a=[0 2.5 -2.5 2 -2.5]
b=[0 0.3 0.25 -2.5 -2.25]
r=[4 8 9 8 8]
(x,y)=(0,0)
function radius(x,y,a,b,r)
n=Float64
for (i,m) in enumerate(a)
R=Float64
push!(R, (((a[i]-x)^2 + (b[i]-y)^2)^0.5 + r[i] ) )
end
push!(n, R)
return n
end