我想在 proc iml 中创建 1、2、3 维变量/数组。我的代码如下所示:
proc iml;
start Mean1(x); /*this is 1 dimension variable/array*/
Mean1(x)=sum(x)/dim(x);
finish;
proc iml;
start Mean2(x); /*this is 2 dimension variable/array*/
Mean1(x)=sum(x)/dim(x);
finish;
proc iml;
start Mean3(x); /*this is 3 dimension variable/array*/
Mean1(x)=sum(x)/dim(x);
finish;
我试着这样做:
proc iml;
declare double x[dim(n),dim(n)];
start Mean2(x); /*this is 2 dimension variable or array*/
Mean1(x)=sum(x)/dim(a, x);
finish;
但它不起作用。你可以帮帮我吗?