I do not understand how to plot/visualize a solution to some function with different time and space steps. I have the below function handle and I need to plot the exact solution to approximate the the error in the approximate solution. Can someone please explain the most efficient method of doing this? I have not calculted the approximation yet, but it will be in a 2x2 array format, please also elaborate on plotting the error.
exact = @(t,x) exp(-(x-0.4).^2/(2*alphat + 1/sigma))/sqrt(sigma*alpha*t+3);