Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

What is correct variables of H for this code?

1 visualizzazione (ultimi 30 giorni)
Tu Nguyen
Tu Nguyen il 21 Mar 2022
Chiuso: Cris LaPierre il 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?')

Risposte (0)

Questa domanda è chiusa.

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by