Code Ribbon Pink October
이전 댓글 표시
Hello Family,
As part of Pink October: a month dedicated to raising awareness of breast cancer, which takes place in many countries around the world. It aims to inform the public about the importance of early detection, support breast cancer research, and show solidarity with those affected by the disease.
I'd like to create the “pink ribbon” for this month using MATLAB, to show what's possible. Can someone help me with the code, as I still can't get it right?
The most recent code is :
t = linspace(0, 2*pi, 1000); % Partie supérieure (arc ouvert)
x1 = sin(t);
y1 = cos(t) + 1; % Partie gauche (descente)
x2 = -0.5 + 0.5 * cos(t/2);
y2 = -1 - t/pi; % Partie droite (descente)
x3 = 0.5 - 0.5 * cos(t/2);
y3 = -1 - t/pi;
figure; hold on; % Arc supérieur (boucle du ruban) - non rempli
plot(x1, y1, 'm', 'LineWidth', 5); % Descente gauche
fill(x2, y2, 'm', 'EdgeColor', 'm', 'LineWidth', 5); % Descente droite
fill(x3, y3, 'm', 'EdgeColor', 'm', 'LineWidth', 5);
axis equal; axis off; title('Ruban Rose'); hold off;
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

