How can I add a column with labelining in a matrix
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have data matrix. I have to add label column with same name Before in the matrix. How I can add this labeling?0 commentaires
Réponse acceptée
Chunru
le 27 Août 2021
% Create a table with some data
a = (1:10)'; b=rand(10, 1); c=randi([1,100], 10, 1);
T = table(a, b, c)
% Now add the label
T.label = repmat("Before", 10, 1);
T = T(:, [end 1:end-1])
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!