i = 1 : 5 : numel(x);
j = 1 : 5 : numel(z);
mesh(z(j), x(i), y(i,j))
Adjust the stride (in this case, '5') appropriately if you want more or
fewer points in your mesh plot.
Note: mesh(z(j), x(i), y(i,j)) is not a misprint. If you use vectors as
coordinates, then number of rows of the third parameter must match the
number of elements of the *second* parameter and
the number of columns
of the third parameter must match the number of elements of the first
parameter.
N = 41, iter = 111000;
vvvv(iter,:) = V;
tmax = 55;
x= linspace(0,tmax,niter);
z = linspace(0,l,N);
y = vvvv';
On using the following
i = 1 : 5 : numel(x);
j = 1 : 5 : numel(z);
mesh(z(j), x(i), y(i,j))
I get an error message at line mesh(z(j),x(i),y(i,j))
error: A(I): Index exceeds matrix dimension.
Maybe it needs to be rewritten
Asha G