how to obtain polar plot (with colorbar) with same dimensions of X Y and Z (i.e. 1XN)?
7 views (last 30 days)
Show older comments
I wish to produce a polar plot with with colorbar
PosCir = (2:1:6);
R = 2:0.25:6.5; % size = 1x19
theta = randi(360,1,19); % size 1x19; non-monotonically varying increase/decrease
Z = rand(1e5,1,19); % size 1x19
now is it possible to make a polar plot with a patch showing color of Z corresponding to eaach theta and R value?
I have used the following function available at: https://in.mathworks.com/matlabcentral/fileexchange/49040-pcolor-in-polar-coordinates
figure
polarPcolor(R,theta,Z,'Ncircles',5,'Nspokes',24,'circlesPos',PosCir); % 2,3,4,5,6
Below, is the ideal example case, but I am dealing with different dimensions of variable. So, it gives error.
%% example case
clear;
PosCir = (2:1:6);
R1 = linspace(2,6.5,19);
theta1 = linspace(0,360,24);
Z1 = linspace(0,10,24)'*linspace(0,10,19);
figure
polarPcolor(R1,theta1,Z1,'Ncircles',5,'Nspokes',24,'circlesPos',PosCir); % 2,3,4,5,6
Any help will be greatly appriciated.
Thanks.
0 Comments
Answers (0)
See Also
Categories
Find more on Polygons in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!