Draw a gradient circle within a circle
18 ビュー (過去 30 日間)
古いコメントを表示
I want to code a gradient circle within a circle like shown in the diagram. Any help will be appreciated. 

0 件のコメント
採用された回答
Matt J
2021 年 6 月 19 日
編集済み: Matt J
2021 年 6 月 19 日
One way might be to use a patch with vertex interpolation, as in this example.
EDIT:
Here's how you might apply that to a circle:
t=linspace(0,360,500); t(end)=[];
x=cosd(t);
y=sind(t);
c=cosd(t);
patch(x,y,c); colormap(gray); axis equal; caxis([-0.7970 ,0.6373])
15 件のコメント
Matt J
2021 年 6 月 20 日
You're quite welcome, but please Accept-click the answer if you consider the question resolved.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!






