MATLAB: Imwrite from polar surf

imwritepolarrgbsurfxyz

Hi all,
I'm looking to write image from a polar-plot which is essentially a sine/cosine plot, rotationally symmetric, and have it output as the 'surf' is displayed. I'm only using red channel, and the surf function plots it correctly, but imwrite converts it to a linear sinusoidal plot.
Here's the output surf and imwrite bmp (need bmp as it keeps the red only – tiff changes it to greyscale)
As you can see, the bmp appears to be as a function of Z,R, when I would like it to be XYZ. I can plot in XYZ using the surf without polar system, but I then want the image to be round (missing the "wings"):
Help would be appreciated as this is really my first program set.
Code used is attached for each: Polar.m is the round surf, but the linear image; Cartes.m is the XYZ plot, but the image with wings (codes have been edited so as to work easier, but functionality remains same).
Many thanks everyone,
Pete.

Best Answer

I've ended up using the latter function (Cartesian), and then applying a cropping mask for the final result. I'm generating a Fresnel Zone Plate for small pixel device, so started from scratch and this is now completed with various input options and a round single channel (from RGB) zone plate being generated. Thanks for the help everyone - it's through a few questions that the code is working as required.