strange Index exceeds matrix dimensions (MATLAB bug?)
Mostrar comentarios más antiguos
Hi all,
I have a function running in particular the following code (sI and tdii2 are matrices):
% debugging
class(sI) % double
class(tdii2) % uint32
size(sI) % 512 672
numel(sI) % 344064
min(tdii2(:)) % 1
max(tdii2(:)) % 343988 (not 391863)
save('temp55.mat', 'sI', 'tdii2');
% this line produces an error
imgvals = sI(tdii2);
When I run it, it breaks with
??? Index exceeds matrix dimensions.
Error in ==> backproject_single at 133
imgvals= sI(tdii2);
Even worse, when I execute this
load('temp55.mat', 'sI', 'tdii2');
imgvals= sI(tdii2);
in the console, it works perfectly fine.
I am totally puzzled.... Has anyone an idea what the cause could be?
Thanks Thomas
Respuestas (1)
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!