Filter löschen
Filter löschen

DICE: launch N times

2 Ansichten (letzte 30 Tage)
Marco Castelli
Marco Castelli am 14 Feb. 2017
Beantwortet: Torsten am 14 Feb. 2017
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

Antworten (2)

Ahmad Moniri
Ahmad Moniri am 14 Feb. 2017
I think you should look at the combntns function.
https://uk.mathworks.com/help/map/ref/combntns.html
  1 Kommentar
Marco Castelli
Marco Castelli am 14 Feb. 2017
This function should be exactly what I'm looking for if it wasn't inside the Mapping Toolbox

Melden Sie sich an, um zu kommentieren.


Torsten
Torsten am 14 Feb. 2017
https://de.mathworks.com/matlabcentral/fileexchange/24325-combinator-combinations-and-permutations
N=...;
combinator(6,N,'p','r');
Best wishes
Torsten.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by