create matrix whose position value is given by a function

Viewed 35

I have to create a 5X5 matrix from a function given below.

f(x,y) = x(1-y) + y(1-x); where 0 < x,y <=5

where x indicate row position and y indicates columns. How do I create a matrix such that bottom left corner is f(0,0) and top left corner has value f(5,5)

1 Answers
Related