//取数:数据是一个二维数组
stocks:=getbk('上证50');
t:= select thisrow as '代码',
spec(base(10029),thisrow) as '行业'
from stocks end;
//转为虚拟变量矩阵
r:=zeros(t[:,'代码'] union2 array(),t[:,'行业']union2 array());
for i:=0 to length(t)-1 do
r[t[i,'代码'],t[i,'行业']]:=1;
return r;