syms x t real
mu=(1/16)^4
m=(cos(x)+1i*sin(x))/(1+((1/mu)^4-1)*(cos(4*t)+1i*sin(4*t)));
n=real(m)
disp(char(n))
So n is a scalar value.
u(row,col)=n(x(i),t(j))
But there you are asking to index n at location x(i) and t(j) . x(i) and t(j) are not integers, so you get an error about indexing at non-integers. If x(i) and t(j) did happen to be integers, you would probably have gotten an error about attempting to index out of range, since n is a scalar.
The cure is to write,
n(x,t) = real(m)
which will declare n as a symbolic function of two variables.
