Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

What is correct variables of H for this code?

1 vue (au cours des 30 derniers jours)
Tu Nguyen
Tu Nguyen le 21 Mar 2022
Clôturé : Cris LaPierre le 21 Mar 2022
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?')

Réponses (0)

Cette question est clôturée.

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by