[4] [3] C [4] = 17 [5] [3] C [5] = 26 [6] [3 ] C [6] = 37 [1] [4] D [1] = 3 [2] [4] D [2] = 24 [3] [4] D [3] = 81 [4] [4] D [4] = 192 [ 5] [4] D [5] = 375 [6] [4] D [6] = 648 [1] [5] E [1] = 2 [2] [5] E [2] = 5 [3] [5] E [3] = 10 [4] [5] E [4] = 17 [5] [5] E [5] = 26 [6] [5] E [6] = 37 [1] [6] F [1] = 4 [2] [ 6] F [2] = 7 [3] [6] F [3] = 12 [4] [6] F [4] = 19 [5] [6] F [5] = 28 [6] [6] F [6] = 39 3 2 2 3 2 4 6 9 5 24 5 7 11 28 10 81 10 12 18 65 17 192 17 19 27 126 26 375 26 28 28 217 37 648 37 39 解决方案 如果你想要要获得[低,高]范围内的随机数,请使用此函数。 展开 | 选择 | Wrap | 行号 展开 | 选择 | Wrap | 行号 你必须在主函数之外使用RandInRange()函数,对吗? HELLO ALL. How to get a random number from this matrix? rand( )%[ ] [ ] =and get the value? if i use like this [ ] [ ] = it error, so what must I do? [1][2] A[1]=3[2][2] A[2]=6[3][2] A[3]=11[4][2] A[4]=18[5][2] A[5]=27[6][2] A[6]=38 [2][2] B[1]=2[2][2] B[2]=9[2][2] B[3]=28[2][2] B[4]=65[2][2] B[5]=126[2][2] B[6]=217 [1][3] C[1]=2[2][3] C[2]=5[3][3] C[3]=10[4][3] C[4]=17[5][3] C[5]=26[6][3] C[6]=37 [1][4] D[1]=3[2][4] D[2]=24[3][4] D[3]=81[4][4] D[4]=192[5][4] D[5]=375[6][4] D[6]=648 [1][5] E[1]=2[2][5] E[2]=5[3][5] E[3]=10[4][5] E[4]=17[5][5] E[5]=26[6][5] E[6]=37 [1][6] F[1]=4[2][6] F[2]=7[3][6] F[3]=12[4][6] F[4]=19[5][6] F[5]=28[6][6] F[6]=39 3 2 2 3 2 46 9 5 24 5 711 28 10 81 10 1218 65 17 192 17 1927 126 26 375 26 2838 217 37 648 37 39 解决方案 If you want to get a random number in the range [low, high), use this function. Expand|Select|Wrap|Line Numbers Expand|Select|Wrap|Line NumbersYou have to take the RandInRange() function outside the main function, right? 这篇关于随机矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 18:18