what is happening when i run this code line? I have the following MATLAB code:

x=[1 2 3; 4 5 6; 7 8 9;];
u=(0:255)/(255-1).^1.05;
x2=u(x+1)


when I run this code I get the following as a result in x2:

x2 =

0.0030    0.0060    0.0090
0.0119    0.0149    0.0179
0.0209    0.0239    0.0269


what is happening when I call this line x2=u(x+1)? and how to write it mathematically? 

Thank you very much in advance
You are putting the values of 

u(2),...,u(10)


in a $3\times 3$ matrix with the shape of the index matrix $x$. This could be written simply as $$x2_{(i,j)}= u (x_{(i,j)}+1),\;(i,j)\in[1,2,3]\times[1,2,3]\,. $$ 

For further matrix shape conversions, you can have a look at vectorization or matricization, and you can find notations in chapter 3.4 Matricization of a tensor of Multilinear operators for higher-order decompositions, T. Kolda, 2006.