Files
it-labs/ТЕМА2/Prog1.m
Пользователь № 2 аудитории Ж-202 fd1b27c397 отчет
2026-02-12 11:57:24 +03:00

23 строки
466 B
Matlab

XX=load('dan_vuz.txt');
size(XX);
X=XX(:,3:13);;
R=corr(X);
[vect,lambda]=eig(X'*X);
Sobst=diag(lambda);
fprintf('Eigenvalues:\n %f \n',Sobst);
fprintf('\n');
SobMax=Sobst(end);
GlComp=vect(:,end);
Delt=100*SobMax/sum(Sobst);
fprintf('Delta= %d \n ',round(Delt));
Res=X*GlComp;
fprintf(' Results \n ');
fprintf('%d %f \n ',[XX(:,1),Res] ');
save res.mat Res -mat;
graphics_toolkit('gnuplot')
hist(Res,20)
xlabel('Results ');
ylabel('Number of Unis ');
hist(Res,20)