everillusion 发表于 2009-10-30 21:42:48

(求助)为什么不能用自定义变量定义数组

1.定义数组时用了下面这一段语句
n=20      ;数组维数
array inorm(n,3)
提示说dimension should be positive integer, 我把n 换成直接用20就没有问题了。但是手册里明明写着数组维数可以是自定义的变量啊,只要不是表达式就行
manual 里是这样说的:In the above specification, var1 is any valid variable name, and n1, n2 . . . are either actual integers, or the scalar variable (dim), or single user-defined variables (not expressions)。现在不知道这是为什么

everillusion 发表于 2009-10-31 19:44:28

顶起来
没有人碰到这样的问题吗?有哪位可以解释一下啊
页: [1]
查看完整版本: (求助)为什么不能用自定义变量定义数组