Why do I get the Error: Array indices must be positive integers or logical values.
Mostrar comentarios más antiguos
Xtsparse = zeros(size(Xt));
l=0.;
help = size(Xt)*keep;
rounded = round(help);
while l<rounded
Xtsparse(l)=max(abs(Xt));
while r<size(Xt)
if(Xt(r)==max(abs(Xt)))
Xt(r)=0;
end
end
end
when using this Code and try it to Run i always get the Error "Array indices must be positive integers or logical values." in line "Xtsparse(l)=max(abs(Xt));"
Does anyone know, why this Error occurs?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing 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!