Yes!
Yours are different. Yours are also an easier problem.
I set up everything in polar coordinates in that code, then used the pol2cart function to create Cartesian representations for them, and plotted them in Cartesian space. My code drew the polar coordinates the same way. It did not use polar or polarplot, since they do not offer the necessary options.
Set your data up in polar coordinates, use pol2cart, patch, then plot.
Use the Plot Full Circumference and Plot Radials section in my code your referred to, to plot the polar coordinate grid. Use the text function for the radial and angle labels if you want them. Use the values in the grid plotting part of my earlier code to get the (x,y) values for your text calls.
This code snippet should get you started:
theta = linspace(0, 2*pi, 18);
Data1 = rand(1, 18)*0.5 + 0.5;
Data2 = rand(1, 18)*0.5;
[x1, y1] = pol2cart(theta, Data1);
[x2, y2] = pol2cart(theta, Data2);
figure(1)
patch([x1 fliplr(x2)], [y1 fliplr(y2)], 'g', 'EdgeColor','g')
hold on
plot(x1, y1, '-k')
plot(x2, y2, '-r')
hold off
axis equal
Experiment to get the result you want. Post back if you have problems. I’ll do my best to help.
Best Answer