Look at the effects of JPEG compression on images, choosing between 8 compression levels, and obtain a comparison between uncompressed and compressed images. You can also generate the cosine transform of the compressed image.
in this line you are declaring an inline function where the independent variable is "x". If i remember well you should call it writing fun(par) where par is your value, in this case a vector i suppose, because the formula looks like a matricial factorization.
the function will calculate T*par*T' :)