Info

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

Hie, how can i solve this error, "Index exceeds matrix dimensions"

1 Ansicht (letzte 30 Tage)
Talent Mukaro
Talent Mukaro am 16 Jun. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
The code is as below;
repelem = {};
for ii = 1:numel(subset)
subsetLabels(ii) = repelem((subset(ii).Description),subset(ii).Count,1);
end
Then the error is;
Index exceeds matrix dimensions.
Error in SignLive (line 19)
subsetLabels(ii) = repelem((subset(ii).Description),subset(ii).Count,1);
THANK YOU IN ADVANCE FOR YOUR UNWAVERING SUPPORT AND HELP.
  5 Kommentare
KSSV
KSSV am 16 Jun. 2020
repelem is a inbuilt function.....you are not supposed to use like that. What version you are using?

Antworten (1)

KSSV
KSSV am 16 Jun. 2020
Bearbeitet: KSSV am 16 Jun. 2020
Try:
N = numel(subset) ;
subsetLabels = cell(N,1);
for ii = 1:N
subsetLabels{ii} = repelem((subset(ii).Description),subset(ii).Count,1);
end
  3 Kommentare
KSSV
KSSV am 16 Jun. 2020
What data you have actually? Attach your data.
Talent Mukaro
Talent Mukaro am 16 Jun. 2020
Kindly see attached code and the data set pics for one class that is sign zero

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