%macro k(t,h)
proc iml;
use hh_1; read all into x_1;hs_1=nrow(x_1);a=j(hs_1,hs_1,0);
%do i=1 %to hs;
%if abs(i-&t) le &h %then %do; kh=(3/4&h)(1-((i-&t)/&h)*((i-&t)/&h));a[i,i]=kh;%end;
%end;
print a;
quit;
%mend;
%k(1,1);
但是程序运行后报错:ERROR: 在需要数值操作数的 %EVAL 函数或 %IF 条件中发现字符操作数。条件是:hs
ERROR: %TO 值(%DO I 循环中)无效。
ERROR: 宏 k 将终止执行。
求高手帮查找一下问题。十分感谢!



雷达卡



京公网安备 11010802022788号







