Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

I had asked for an explanation for 2 codes before this. This algorithm compares the previous two. Can I get a step by step explanation as to how this works? I'd really appreciate any help.

1 visualización (últimos 30 días)
Comparison of Efficiency in Terms of Reduction:
function [G]= compare(A)
G=cell(1,9);
[U S V]=svd(A); %calling built-in SVD
G{1,1}=S;
Ts=trace(S); %sum of diag elements of S
[Vj,D]=JacobiEig(A); %calling Jacobi SVD method from the same directory
G{1,2}=D;
Tj=trace(D); %sum of diag elements of D
[Z PCred Vp Di] = pca1(A); %calling PCA method from the same directory
G{1,3}=Di;
Tp=trace(Di); %sum of diag elements of Di
if Ts < Tj
disp('SVD is lighter in magnitude than Jacobi SVD');
if Ts < Tp
disp('SVD is lighter in magnitude than PCA');
else
disp('PCA is lighter in magnitude than SVD');
end
else
disp('Jacobi SVD is lighter in magnitude than SVD');
if Tj < Tp
disp('Jacobi SVD is lighter in magnitude than PCA');
else
disp('PCA is lighter in magnitude than Jacobi SVD');
end
end
[K,m,L,n] = Compress(S,D);
[Mj,Ms] = Recon(K,m,L,n,Vj,S,V,U);
G{1,4}=K;
G{1,5}=Mj;
G{1,6}=PCred;
G{1,7}=Z;
G{1,8}=L;
G{1,9}=Ms;
end

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by