www.pudn.com > Volterraprediction.rar > PhaSpa2VoltCoef.m, change:2006-02-15,size:1413b

```function [Un,len_filter] = PhaSpa2VoltCoef(xn,p)
% 构造 Volterra 自适应 FIR 滤波器的输入信号矢量 Un
% [Un, len_filter] = PhaSpa2VoltCoef(xn, p)
% 输入参数：    xn           相空间中的点序列(每一列为一个点)
%               p            Volterra 级数阶数
% 输出参数：    Un           Volterra 自适应 FIR 滤波器的输入信号矢量 Un

[m,xn_cols] = size(xn);
Un(1,:) = ones(1,xn_cols);
h_cols_1 = 0;

for k = 1:p

clear h;
h(1,:) = zeros(1,k);
i = 1;

while h(i,end)<m-1
i = i + 1;
for j = k:-1:1
if (h(i-1,j)==m-1)
h(i,1:j+1) = ones(1,j+1) * (h(i-1,j+1)+1);
h(i,j+2:end) = h(i-1,j+2:end);
break;
else
h(i,1) = h(i-1,1)+1;
h(i,2:end) = h(i-1,2:end);
end
end
end
h;
h_cols_1 = [h_cols_1;h(:,1)];

index = m - h;
[index_rows,index_cols] = size(index);

array = zeros(index_rows,index_cols);
un = zeros(index_rows,xn_cols);
for q = 1:xn_cols
vector = xn(:,q);
for u = 1:index_rows
for v = 1:index_cols
array(u,v) = vector(index(u,v));
end
end
un(:,q) = prod(array,2);
end
Un = [Un;un];
clear un;
end

h_cols_1;
[temp,index_rows]  = sort(h_cols_1);
Un = Un(index_rows,:);

```