index to column vectors (crossvalind)

2 次查看(过去 30 天)
inputs is a 3x50 matrix
C = num2cell(inputs,1);
Indices = cellfun(@(C) crossvalind('Kfold',C, 10),C,'un',0);
Indices =
Columns 1 through 9
[3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double]
Columns 10 through 18
[3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double]
Columns 19 through 27
[3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double]
Columns 28 through 36
[3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double]
Columns 37 through 45
[3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double]
Columns 46 through 50
[3x1 double] [3x1 double] [3x1 double] [3x1 double] [3x1 double]
what i wanted to get was just indices for each column vector... any ideas?

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by