Maximum variable size allowed by the program is exceeded.
Mostrar comentarios más antiguos
It's occuring in the knnclassifier!!! Need help!
Error:
Maximum variable size allowed by the program is exceeded.
Code:
function D = distfun(Train, Test, dist)
%DISTFUN Calculate distances from training points to test points.
[n,p] = size(Train);
D = zeros(n,size(Test,1));
numTest = size(Test,1);
switch dist
case 'sqeuclidean'
for i = 1:numTest
D(:,i) = sum((Train - Test(repmat(i,n,1),:)).^2, 2);
end
case 'cityblock'
for i = 1:numTest
D(:,i) = sum(abs(Train - Test(repmat(i,n,1),:)), 2);
end
.
.
.
1 comentario
Jan
el 24 de En. de 2013
Please mention the line, which causes the error.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Fuzzy Logic Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!