- /
-
Yes, No, XOR Maybe
on 9 Nov 2023
- 6
- 15
- 0
- 0
- 1090
drawframe(24);
Write your drawframe function below
function drawframe(f)
% Background plot
figure('Position', [100, 100, 300, 300]);
set(gca, 'color', 'w', 'YTick', [], 'XTick', []);
axis([0 2 0 2]);
axis equal;
axis off
% Checkbox background
color = [47, 126, 178]/255; % brand color
rectangle('Position', [0 0 0.5 0.5], 'Curvature', 1, 'FaceColor', color, 'EdgeColor', 'none');
rectangle('Position', [0.1 0.1 0.3 0.3], 'Curvature', [1 1], 'FaceColor', 'w', 'EdgeColor', 'none');
text(0.7, 0.30, 'Maybe', 'FontSize', 24, 'Color', color);
rectangle('Position', [0 0.6 0.5 0.5], 'Curvature', 1, 'FaceColor', color, 'EdgeColor', 'none');
rectangle('Position', [0.1 0.7 0.3 0.3], 'Curvature', [1 1], 'FaceColor', 'w', 'EdgeColor', 'none');
text(0.7, 0.90, 'No', 'FontSize', 24, 'Color', color);
rectangle('Position', [0 1.2 0.5 0.5], 'Curvature', 1, 'FaceColor', color, 'EdgeColor', 'none');
rectangle('Position', [0.1 1.3 0.3 0.3], 'Curvature', [1 1], 'FaceColor', 'w', 'EdgeColor', 'none');
text(0.7, 1.50, 'Yes', 'FontSize', 24, 'Color', color);
if f < 16
text(0.12, 1.46, '⬤', 'FontSize', 20, 'Color', color);
elseif f >= 16 && f <= 32
text(0.12, 0.86, '⬤', 'FontSize', 20, 'Color', color);
else
text(0.12, 0.26, '⬤', 'FontSize', 20, 'Color', color);
end
end