Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

index exceeds the matrix

1 Ansicht (letzte 30 Tage)
indhu ravi
indhu ravi am 15 Mär. 2019
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
for i=1:length(D)
if (h_(i,T)~=D(i))
eps(T)=eps(T)+D(i,:);
end
end
  2 Kommentare
dpb
dpb am 15 Mär. 2019
Insufficient information...
Adam
Adam am 15 Mär. 2019
Don't use length(D) if D is a matrix, use size( D, 1 ) in that case. If the 2nd dimension of D happened to be larger than the first then this code would crash.
That may have nothing to do with your actual error, but as dpb says, you've given us next to no information to help with that apart from guessing and I only guess on a Tuesday.

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by