フィルターのクリア

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?
Talent Mukaro
Talent Mukaro 2020 年 6 月 16 日
Matlab 2014b

回答 (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