Hi,
Read this:
What you want is creating a pxyt array with 3 pages.
Each page contains the values at each step t.
The code you know:
n = 128;
vector_of_x = 1:n;
vector_of_y = 1:n;
[X, Y] = meshgrid(vector_of_x, vector_of_y);
Z=zeros(n,n);
Your surface at t0:
pxyt = zeros(n,n);
pxyt(:, :, 1) = X(:, :);
pxyt(:, :, 2) = Y(:, :);
pxyt(:, :, 3) = Z(:, :);
Your surface at t:
% pxyt = myfunctionP(pxyt)
pxyt(:, :, 3) = rand(n,n);
X = pxyt(:, :, 1);
Y = pxyt(:, :, 2);
Z = pxyt(:, :, 3);
%figure()
%surf(X,Y,Z);
Your point at t:
p = [0;0;0];
kx = 1; % index x
ky = 1; % index y
p(:) = pxyt(kx, ky, :);
Hope it helps,

