Draw a gradient circle within a circle
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sajjad Ahmad Khan
am 19 Jun. 2021
Kommentiert: Matt J
am 20 Jun. 2021
I want to code a gradient circle within a circle like shown in the diagram. Any help will be appreciated. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/658445/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/658445/image.png)
0 Kommentare
Akzeptierte Antwort
Matt J
am 19 Jun. 2021
Bearbeitet: Matt J
am 19 Jun. 2021
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 Kommentare
Matt J
am 20 Jun. 2021
You're quite welcome, but please Accept-click the answer if you consider the question resolved.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Performance finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!