Code Ribbon Pink October
Mostrar comentarios más antiguos
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;
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre App Building en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

