Simulation throwing of two dice?

5 Ansichten (letzte 30 Tage)
Steven Thies
Steven Thies am 11 Feb. 2021
Kommentiert: John D'Errico am 11 Feb. 2021
Can someone please help me with this Script?
% Script with 2 dice asks the user for the number of throws
% There is a fault tolerant and n should be between 50 and 1 million
% It then outputs the result as a plot
  1 Kommentar
Adam Danz
Adam Danz am 11 Feb. 2021
Where's the script? Looks like homework.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

David Hill
David Hill am 11 Feb. 2021
Bearbeitet: David Hill am 11 Feb. 2021
histogram(sum(randi(6,2,input('number of throws'))));%assuming you want the sum of the dice plotted
  3 Kommentare
Steven Lord
Steven Lord am 11 Feb. 2021
If a question sounds like a homework question, please don't post a full solution unless the poster shows what they've done to try to solve it first.
John D'Errico
John D'Errico am 11 Feb. 2021
PLEASE don't do student homework assignments for them. This does not help the student, except to teach them there will always be someone willing to do their work for them.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by