getting error" Index exceeds matrix dimensions."
Mostrar comentarios más antiguos
Hi All I getting error "Index exceeds matrix dimensions." after till element 60623 my code is running fine but after this I am getting above mention error code:-
if true
Data = xlsread('primary school data.xlsx');
k = Data(:,3);
infectednodes = zeros(1,242);
for time = 1:5846
m = find(k==time)
% for l = 1:1:size(infectednodes,1)
for i = m(1):m(end)
if Data(i,1)== 59
infectednodes(i,1) = Data(i,2);
elseif Data(i,1)== infectednodes
infectednodes(i,1) = Data(i,2);
else
break;
end
end
infectednodes = unique(infectednodes);
% end
end
end
error:- m =
0×1 empty double column vector
Index exceeds matrix dimensions.
Error in Q9 (line 8) for i = m(1):m(end)
Thanks in advance
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Work with Components 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!