求matlab大神将以下公式按matlab的语言写出来,小弟在此感激不尽!!!!

2025-01-25 08:20:40
推荐回答(1个)
回答1:

%X,Z是长度为n的序列
n=length(X);
D=n*(dot(Z,Z)-sum(Z))^2;
U=1/D*(sum(Z)*(-dot(X,Z))+dot(Z,Z)*sum(z))
a=1/D*(-n*dot(X,Z)+sum(Z)*sum(X));