필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
Talent Mukaro
Talent Mukaro 2020년 6월 16일
마감: MATLAB Answer Bot 2021년 8월 20일
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
KSSV
KSSV 2020년 6월 16일
repelem is a inbuilt function.....you are not supposed to use like that. What version you are using?

답변 (1개)

KSSV
KSSV 2020년 6월 16일
편집: KSSV 2020년 6월 16일
Try:
N = numel(subset) ;
subsetLabels = cell(N,1);
for ii = 1:N
subsetLabels{ii} = repelem((subset(ii).Description),subset(ii).Count,1);
end
  댓글 수: 3
KSSV
KSSV 2020년 6월 16일
What data you have actually? Attach your data.
Talent Mukaro
Talent Mukaro 2020년 6월 16일
Kindly see attached code and the data set pics for one class that is sign zero

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by