MATLAB: Contour plot of a source which decays with radius.

cartesiancirclecontourcontourfdecayplotpolarradiussoundsource

So i am trying to create a contourf() plot of a source (representative of sound), whose output decays due to the attenuation of sound with radius. I expect the output to be contours of reducing magnitude around the centre point. They should be perfectly circular.
The decay is expressed by the function
10*log10(exp(2*alpha))*(distance from source)
where alpha is calculated earlier in the script. For all intents and purposes, it is just a constant (lets say 0.005).
As i understand i should create it in polar, convert to cartesian and then plot but i end up with linear contours, not circular. I am fairly new to matlab so its all a bit above my head. This is what i have currently:
————–
radius = 0:1000; % the distance from source i want to evaluate
theta = (0:360)*pi/180; % the polar circle in radians
[th,r] = meshgrid(theta,radius); % create a meshgrid??? this step i'm unsure of and only using due to other answers on similar topics
[TH,R] = pol2cart(th,r); %convert to cartesian
A = 10*log10(exp(2*alpha))*R; %define the function for decay of sound
figure(2)
contourf(X,Y,A) % plot. is this right?
colorbar
axis square
———–

Best Answer

Managed to solve this one after returning to the fundamental mathematics. Thought id post here in the case it helps anyone in the future. My issue was incorrect definition of the coordinate system. By replacing the distance from the source, or radius, as sqrt(x^2 + y^2) the system was correctly referenced. The code was as follows:
radius = 0:3600;
theta = (0:0.1:360)*pi/180;
x = radius.*cos(theta);
y = radius.*sin(theta);
[X,Y] = meshgrid(x,y);
A = real(10*log10(exp(2*alpha)).*sqrt(X.^2+Y.^2));
figure(2)
contourf(X,Y,A)
colorbar
axis square