how to fix "index exceed matrix dimension"?
Afficher commentaires plus anciens
if sum(ismember(totalcheck,[ones(size(totalcheck,2))*2],'rows')) > 0
totalsection_matrix{j}{end+1} = [section_index{end}];
if ~isempty(runbet{j,1})
runbet{j,1}(end+1) = 0;
else
runbet{j,1}(1) = 0;
end
end
1 commentaire
KSSV
le 7 Juin 2017
You have not give the complete code...how you think that we can help you?
Réponses (1)
I assume, that you are running a loop for j, it is beyond the length of your cell array _ runbet_, so error popped out. You have to proceed like this:
for j = 1:length(runbet)
if ~isempty(runbet{j,1})
runbet{j,1}(end+1) = 0;
end
end
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!