% Define the frequency of each dice rollrolls = randi([1, 6], 1, 1000); % Simulate rolling a dice 1000 timescounts = histcounts(rolls, 1:7); % Count the frequency of each dice roll% Create a pie chartfigure;
pie(counts, {'1', '2', '3', '4', '5', '6'});
title('Dice Roll Pie Chart');