random函数 运算符号出错

random_pos=[131 + 131];

img

错误: 运算符的使用无效。

你是想表述1-31的区间还是什么

a=[1:31,1:31]

你好,如果需要的是1到31的整数抽样,请用

p = randperm(31,1)