Subscripting a table using linear indexing (one subscript) or multidimensional indexing (three or more subscripts) is not supported.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
hugo monstans thurler dos santos
am 7 Aug. 2021
Kommentiert: hugo monstans thurler dos santos
am 7 Aug. 2021
I try run this code for training and test but it doesn't work.
BOP = readtable('auxiliary_equipment.csv');
head(BOP)
%%
rng('default') % To make sure the results are repeatable
numEnsemble = size(BOP);
numFold = 2;
cv = cvpartition(numEnsemble, 'KFold', numFold);
trainData = BOP(training(cv, 1));
validationData = BOP(test(cv, 1));
Subscripting a table using linear indexing (one subscript) or
multidimensional indexing (three or more subscripts) is not supported. Use a
row subscript and a variable subscript.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 7 Aug. 2021
trainData = BOP(training(cv, 1),:);
validationData = BOP(test(cv, 1),:);
I suspect you are going to fail after that, however. Perhaps you need to replace readtable() with readmatrix()
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!