Info

此问题已关闭。 请重新打开它进行编辑或回答。

What is correct variables of H for this code?

1 次查看(过去 30 天)
Hi all, this is the code of my professor, what is the correct function of H, I tried many times but the code did not run
load Midterm_Dataset-2
l = 2710
Z = (H(1:l*10));
X = reshape(Z,[l, 10]);[![enter image description here][5]][5]
RV = X*X'/length(X)
%eigen decomposition
[U,D,V] = svd(RV);
figure
stem(diag(D))
title('eigenvalues')
%projection
figure
for i = 1:12
xx0 = V(:,i).*Z(1:l);
subplot(4,3,i)
plot(-xx0)
strr = sprintf('principal component: %d', i);
title(strr)
end
sig = 0;
for i = 11:length(V)
sig = sig + V(:,i).*Z(1:l);
end
figure
plot(sig)
title('Emg data?')
figure
subplot(121)
plot(V(:,11).*Z(1:l))
title('Principal component 11, emg?')
subplot(122)
plot(V(:,12).*Z(1:l))
title('Principal component 12, emg?')

回答(0 个)

此问题已关闭。

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by