MATLAB: I want to contour plot X,Y coordinate of temperature distribution heat map, the data field is a ring…

colormapcontour

I want to contour plot X,Y coordinate of temperature distribution heat map, the data field is a shape of ring as shown in below
But I am tring to get the rid of the inner circle bule color because it suppose to be blank space.
I dont know where went wrong….Can someone help? please …
code#:
xv = linspace(min(x), max(x), numel(x));
yv = linspace(min(y), max(y), numel(y));
[Xm,Ym] = ndgrid(xv, yv);
Zm = griddata(x, y, t, Xm, Ym);
figure
contourf(Xm, Ym, Zm)
axis([34 54 10 28])

Best Answer

load("data.mat") ;
% Get center of circles
C = [mean(x) mean(y)] ;
% Get radius of inner circle
dx = C(1)-x ; dy = C(2)-y ;
Ri = min(sqrt(dx.^2+dy.^2)) ;
Ro = max(sqrt(dx.^2+dy.^2)) ;
% Create strip
m = 10 ; n = 100 ;
R = linspace(Ri,Ro,m) ;
th = linspace(0,2*pi,n) ;
[R,T] = meshgrid(R,th) ;
X = C(1)+R.*cos(T) ;
Y = C(2)+R.*sin(T) ;
Z = griddata(x,y,t,X,Y) ;
pcolor(X,Y,Z)
shading interp
colorbar