自相关系数 matlab
x=[3748.9203918.1563790.5303582.8553547.9773650.6983845.8223891.0593688.125...3754.71...
x=[3748.920 3918.156 3790.530 3582.855 3547.977 3650.698 3845.822 3891.059 3688.125 ...
3754.715 3783.728 3536.327 3583.299 3494.016 3386.630 3272.499 3267.554 3296.277 ...
3453.727 3774.504 3803.070 3729.154 3776.943 3959.119 4055.779 4010.888 3821.319 ...
3925.041 3878.924 3904.920 3851.687 3975.782 3948.088 3936.121 3914.072 3710.818 ...
3783.049 3711.444 3675.147 3559.217 3576.197 3676.230 3580.868 3611.330 ...];
%求自相关系数及权重
rk=autocorr(x,8)
wk=rk(2:6)./sum(rk(2:6))
Error: File: D:\MATLAB7\work\lunwen.m Line: 7 Column: 3
The expression to the left of the equals sign is not a valid target for an assignment. 展开
3754.715 3783.728 3536.327 3583.299 3494.016 3386.630 3272.499 3267.554 3296.277 ...
3453.727 3774.504 3803.070 3729.154 3776.943 3959.119 4055.779 4010.888 3821.319 ...
3925.041 3878.924 3904.920 3851.687 3975.782 3948.088 3936.121 3914.072 3710.818 ...
3783.049 3711.444 3675.147 3559.217 3576.197 3676.230 3580.868 3611.330 ...];
%求自相关系数及权重
rk=autocorr(x,8)
wk=rk(2:6)./sum(rk(2:6))
Error: File: D:\MATLAB7\work\lunwen.m Line: 7 Column: 3
The expression to the left of the equals sign is not a valid target for an assignment. 展开
1个回答
展开全部
把x那个表达式右中括号前的3个点去掉
追问
恩 这是个错误 rk=autocorr(x,8)
这个表达式你认识么~~~
追答
就是求取x的自协方差函数,8表示自协方差偏移点为0,1,2,...,8
也就是求Rx[0],...,Rx[8]
而Rx[k]=(sum_(n=0)^(N-1-k) (x[n+k]-mx)(x[n]-mx)')/(sum_(n=0)^(N-1) (x[n]-mx)(x[n]-mx)'))
其中mx为x的均值,1/N sum_(n=0)^(N-1) x[n]
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询