OK, I found a solution, a bit inspired by José-Luis' answer, but i was not satisfied with the way he did it, as i didn't get any indepth knowledge of contourplots, which is what i will need to use in my further work with a more complex model. If anyone is interested here is my solution.
As a background story i got some different temperatures in a few layers, T1,T2,T3, and also different temperature gradients dT1,dT2 through each layer depending on their thermal conductivity.
Now i make a meshgrid for x and y coordinates, calculate the corresponding radius in each array-element. I have 2 for loops that goes through each r(m,n) and calculates the temperature. Basicly it's temperature, T, as a function of the radius, r.
% Make the coordinatesystem that fits with the radius.
[x_coor,y_coor] = meshgrid(-r3:0.001:r3,r3:-0.001:-r3);
r = sqrt(x_coor.^2+y_coor.^2); % Corresponding radius
% Get ready for the loop
m = 1;
n = 1;
T_matrix = zeros(size(r));
dT2 = (T2-T1)/(r2-r1);
dT3 = (T3-T2)/(r3-r2);
for m = 1:length(r)
for n = 1:length(r)
if r(m,n) <= r1 % layer 1
T_matrix(m,n) = T1;
elseif r(m,n) < r2 % layer 2
T_matrix(m,n) = T1 + (r(m,n)-r1)*dT2;
elseif r(m,n) <= r3 % layer 3
T_matrix(m,n) = T2 + (r(m,n)-r2)*dT3;
else % if none of these layers, it must be outside
T_matrix(m,n) = Te; % environmental temperature
end
end
end
% Draw the contour
contourf(x_coor,y_coor,T_matrix,80,... % 80 colours
'edgecolor','none'); % no edge
% Draw the cable boundaries
hold all
phi = 0:0.01:2*pi; x_circ = r1*cos(phi); y_circ = r1*sin(phi);
plot(x_circ,y_circ,'Color','black','LineWidth',2)
phi = 0:0.01:2*pi; x_circ = r2*cos(phi); y_circ = r2*sin(phi);
plot(x_circ,y_circ,'Color','black','LineWidth',2)
phi = 0:0.01:2*pi; x_circ = r3*cos(phi); y_circ = r3*sin(phi);
plot(x_circ,y_circ,'Color','black','LineWidth',2)
Thanks for the help.