蓝天小白云 发表于 2014-7-17 17:33

matlab z反变换后,如何进行cov运算,报错提示'sym'

本人在进行信号的盲解卷积,以卷积混合的方式来仿真几个信号在传播过程中的混合现象,采用z变换来进行卷积,但是在z反变换后,接下来要进行cov求协方差,因z反变换后结果中有71*kroneckerDelta(n - 1, 0),所以报错,显示Undefined function 'bsxfun' for input arguments of type 'sym'.
Error in cov (line 93)
xc = bsxfun(@minus,x,sum(x,1)/m);% Remove mean
Error in pcamat (line 92)
covarianceMatrix = cov(vectors', 1);应该是sym的问题,请问如何解决?望各位给点建议。代码如下
clear all;close all;clc;
syms z;
n=0:1:99;
L=length(n);
win=L/50;
f1=0.01;f2=0.08;f3=0.1;f4=0.5;
s1=sin(2*pi*f1*n);
s2=sin(2*pi*0.5*f2*n);
s3=sin(2*pi*f3*n);
s4=sin(2*pi*f4*n);
figure('numbertitle','off','name','源信号')
subplot(221);plot(s1);
subplot(222);plot(s2);
subplot(223);plot(s3);
subplot(224);plot(s4);
Z=;
a11=rand(1,4)*Z;a12=rand(1,4)*Z;a13=rand(1,4)*Z;a14=rand(1,4)*Z;
a21=rand(1,4)*Z;a22=rand(1,4)*Z;a23=rand(1,4)*Z;a24=rand(1,4)*Z;
a31=rand(1,4)*Z;a32=rand(1,4)*Z;a33=rand(1,4)*Z;a34=rand(1,4)*Z;
a41=rand(1,4)*Z;a42=rand(1,4)*Z;a43=rand(1,4)*Z;a44=rand(1,4)*Z;
A=;
s=;
x=A*s;
x=simple(x);
X=iztrans(x);
m1=X(1,:);m2=X(2,:);m3=X(3,:);m4=X(4,:);%%%%%%%%%%白化
m1=m1-mean(m1); %白化开始
m2=m2-mean(m2);
m3=m3-mean(m3);
m4=m4-mean(m4);
xin=;
Rxx=(xin*xin')/size(xin,2); %%%%%%%%%%%求协方差矩阵
=pcamat(xin);
=whitenv(xin,E,D);
页: [1]
查看完整版本: matlab z反变换后,如何进行cov运算,报错提示'sym'