For a simple example, if rho is the following 2D array:
rho =
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
and theta is the following 2D array:
theta =
0 0 0 0 0 0
15 15 15 15 15 15
30 30 30 30 30 30
45 45 45 45 45 45
60 60 60 60 60 60
75 75 75 75 75 75
90 90 90 90 90 90
Here is the example code:
[rho, theta] = meshgrid(0:0.2:1.0,0:15:90);
[X Y] = pol2cart(theta*pi/180,rho);
S = surf(X,Y,ones(size(X)));
Picture = imread('autumn.tif');
set(S,'FaceColor','Texturemap','CData',Picture);
view(2);
Type
or
in the MATLAB command window for more information of the commands used in the example code.
For more information on the surface properties, please look at the following URL:
For a transition from Cartesian coordinates to polar or cylindrical, review the following function:
Best Answer