Thanks for replying. I did not have any error message with categorical_logit_rng, I just do not know how to use it correctly and ended up not using it. categorical_logit_rng gives an integer as result, but I wanted to get the probabilities. My first try was following the mathematical formulae â€” it required a couple of for loops, however. Then, I read about softmax function which does the same math.

Hi, I am with the same doubt. But couldnâ€™t figure out how to use the softmax function to generate probabilities instead of integers. How the code chunk would be?