Short code for assigning labels in a large dataset

2 views (last 30 days)
Hello
Please I have a function which calculate conformal prediction
for instance if k
Z has a size of 1200 12000
rows = 1200
column = 1200
And I want to assign c1, c2 , c3 class to each rows respectively for instance
column 1
a = Z(:,1);
b =repmat(['c1';'c2'; 'c3'],size(a,1)/3,1);
% assuming rows are even if not use some rounding function
T=table ;
T.distance=a ;
T.class=b;
Column 2
a = Z(:,2);
b =repmat(['c1';'c2';'c3'],size(a,1)/3,1);
% assuming rows are even if not use some rounding function
C=table ;
C.distance=a ;
C.class=b;
I want a short code that will enable me do this instead of having to do this for each different 1200 columns
Thank you in advance
Tino

Answers (0)

Categories

Find more on Desktop in Help Center and File Exchange

Tags

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!