Why do I get the Error: Array indices must be positive integers or logical values.
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!