Hi everyone,

ive got my LB code working but im struggling on plotting the results i want in matlab. Im sure its just a few simple mistakes on my part but if anybody you help me out id appreciate it.

The simulation runs in time steps of 0.0067 secs and runs for approx 5.5 secs. I want to plot the water surface height (rho) at the times t=1, t=2, t=3, t=4 and t=5 so ive tried the following…

subplot(2,1,1)

if t>=1;

plot(rho(end/2,:));

hold on

subplot(2,1,1)

if t>=2;

plot(rho(end/2,:));

hold on

…etc to t=>=5

This doesnt seem to plot rho at the discrete times but simply plots rho at all the time steps on the same graph.

One other problem is i want to plot rho as a time series at one particular coordinate showing how it changes over time. I thought to do this for a random point on the mesh would simply be plot(rho(end/2,50));, but again this just plots a blank graphy.

I know this may seem easy to a lot of you and i cant understand why i havent been able to get it to work yet but if any of you can help then that would be great. Thanks.

James.