Info

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

I have problem on defining the variable U, I provide the code below and the picture which contain the dimension of each variable that the code allowed me to get so far, help

1 vue (au cours des 30 derniers jours)
%% data processing load('train.mat'); X=train; [n,m]=size(X); c=mean(X);e=std(X); %% data scaling X0=(X-ones(n,1)*c)./(ones(n,1)*e); %% getting kernel matrix k=zeros(n,n); for i=1:n z=X0(i,:); for j=1:n y=X0(j,:); k(i,j)=exp(-norm(z-y)*norm(z-y)/(m*sqrt(e*e')*320)); end end ln=ones(n,n)/n; %% kernel matrix scaling K=(k-ln*k-k*ln+ln*k*ln); [u,d,v]=svd(K); a=diag(d/n); %% eigenvector normalization for i=1:n h=u(1:n,i:i); b=a(i,1); if b>0.0001 U(1:n,i:i)=h/sqrt(b); end end [N,M]=size(U);
and the pictures show the dimensions of the variables, I'm still getting undefined variable 'U' I don't know where I doing wrong

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by