Error in Indexing & Matrix Dimension
Mostrar comentarios más antiguos
I have the following code excerpt and I've been debugging for days. When I tried with a smaller scale (5 variables), it's alright but when I tried with 95, it returned an error,
"Index exceeds matrix dimensions.
Error in Workshop (line 307) outoo{i}(i00{i} == jj,2:4) = availmat{i}(t(1:ba{i}(jj)),1:3);"
load('duplicatematrices');
load('availmat');
for i=1:95
[ba{i},i00{i}] = histc(duplicatematrices{i}(:,2),unique(duplicatematrices{i}(:,2)));
outoo = duplicatematrices;
for jj = 1:numel(ba{i})
t = find(availmat{i}(:,1) == jj);
outoo{i}(i00{i} == jj,2:4) = availmat{i}(t(1:ba{i}(jj)),1:3);
end
end
Can someone please help me?
1 comentario
Jan
el 27 de Sept. de 2013
Please add a complete copy of the error message by editing the question. Then we do not have to guess the exact message and the location of the error.
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!