I have the following function:
f[x_,y_]:=x^2/y
and two sample lists (that are actually longer):
x={2,4,6}
y={3,5,7}
I want to make a table of the form {x,y,f}
where the pair x
,y
are the corresponding values of x
and y
paired at their respective positions; for example, {2,3},{4,5},{6,7}
.
I tried using the next command:
Table[{i,j,f[i,j]},{i,x},{j,y}]
but I get a very big table (it is supposed my table should have only three rows, in this case). How could I do this?
Thank you in advance.