MATLAB: How to create a BSFC contour map

Hi,
I've managed to create a 3D plot using BSFC, speed and BMEP data:
figure
plot3(speed,BMEP,BSFC)
tri = delaunay(speed,BMEP);
h = trisurf(tri,speed,BMEP,BSFC);
shading interp
colorbar
I would however like to create a simple 2D contour map using the same data and have been unsuccessful. Can any one help?
The data used is:
speed = [1200 2400 2400 2400 3000 1800 1800];
BMEP = [1.70 1.30 2.55 4.22 4.99 4.25 1.71];
BSFC=[ 0.2927 0.3278 0.2530 0.2056 0.1834 0.2171 0.3224]
Any help would be appreciated.

Best Answer

How's this? It uses John D'Errico's gridfit function.
% Input data:
speed = [1200 2400 2400 2400 3000 1800 1800];
BMEP = [1.70 1.30 2.55 4.22 4.99 4.25 1.71];
BSFC=[ 0.2927 0.3278 0.2530 0.2056 0.1834 0.2171 0.3224];
% Create gridded data:
speedgrid = linspace(min(speed),max(speed),50);
BMEPgrid = linspace(min(BMEP),max(BMEP),50);
BSFCgrid = gridfit(speed,BMEP,BSFC,speedgrid,BMEPgrid);
% Plot:
contour(speedgrid,BMEPgrid,BSFCgrid)
hold on
plot(speed,BMEP,'r*','markersize',12)
legend('contours','data points')