MATLAB Answers

DICE: launch N times

조회 수: 1(최근 30일)
Marco Castelli
Marco Castelli 2017년 2월 14일
답변: Torsten 2017년 2월 14일
I get N dice of which each face has a number from 1 to 6. I'd like representing all the possibility with a matrix in which each column contains the N value of the dice.
Can you help me to write a script to do this task using only function in the Matlab suite and not other toolbox?
Thanks Marco


Ahmad Moniri
Ahmad Moniri 2017년 2월 14일
I think you should look at the combntns function.
  댓글 수: 1
Marco Castelli
Marco Castelli 2017년 2월 14일
This function should be exactly what I'm looking for if it wasn't inside the Mapping Toolbox

댓글을 달려면 로그인하십시오.

Torsten 2017년 2월 14일
Best wishes


Community Treasure Hunt

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

Start Hunting!

Translated by