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
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!