Hie, how can i solve this error, "Index exceeds matrix dimensions"
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
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 Commenti
KALYAN ACHARJYA
il 16 Giu 2020
Please provide the subset details. Also why you are using repelem={}; Please note repelem is a MATLAB inbuilt function.
KSSV
il 16 Giu 2020
Yes..the problem could be due that line....
repelem = {} ;
Remove that line.
Talent Mukaro
il 16 Giu 2020
KSSV
il 16 Giu 2020
repelem is a inbuilt function.....you are not supposed to use like that. What version you are using?
Talent Mukaro
il 16 Giu 2020
Risposte (1)
Try:
N = numel(subset) ;
subsetLabels = cell(N,1);
for ii = 1:N
subsetLabels{ii} = repelem((subset(ii).Description),subset(ii).Count,1);
end
3 Commenti
Talent Mukaro
il 16 Giu 2020
KSSV
il 16 Giu 2020
What data you have actually? Attach your data.
Talent Mukaro
il 16 Giu 2020
Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!