filling between two polar plots
3 views (last 30 days)
Show older comments
i have read the fill command and i know that i need to convert to cartesian coordinated in order to use it but when i do that ,the image contour gets distorted . is there a way to do the fill command in polar coordinates? Thanks
0 Comments
Answers (1)
KSSV
on 16 Feb 2017
angle = linspace(0,2*pi) ;
radius = 2*ones(1,100) ;
h = polar(angle,radius);
patch( get(h,'XData'), get(h,'YData'), 'g')
3 Comments
KSSV
on 16 Feb 2017
Check this example may be useful:
clc; clear all ;
angle = linspace(0,2*pi) ;
a1 = randsample(angle,10) ;
a2 = randsample(angle,2) ;
r1 = rand*ones(size(a1)) ;
r2 = rand*ones(size(a2)) ;
a12 = [a1 a2] ;
r12 = [r1 r2] ;
h = polar(a12,r12);
patch( get(h,'XData'), get(h,'YData'), 'g')
See Also
Categories
Find more on Polar Plots 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!