proc iml;r=uniform(repeat(0,20,5));
start sd(x);z=0;do i=1 to 5;if x>r[1,i] thenz=z+r[2,i];else z=z-r[2,i];end;print z;finish sd;
run sd(0.6);
结果提示是 matrix has not been set to value
不知哪儿出错了,望高人指点。
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
start sd(x) global (r);z=0;do i=1 to 5;if x>r[1,i] thenz=z+r[2,i];else z=z-r[2,i];end;print z;finish sd;
quit;
pls try it.
高手!
还没学到这块,先受教了1