Table, how to replace all values less than X with Y in specific column
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
newbie9
le 31 Oct 2019
Réponse apportée : the cyclist
le 31 Oct 2019
Working with a Matlab table, not matrix, how can I replace all values less than X with Y in specific column?
0 commentaires
Réponse acceptée
the cyclist
le 31 Oct 2019
% Create a table with two variables
a = [1;2;3];
b = [4;5;6];
tbl = table(a,b);
% For one of the variables, replaces values less than 2 with 3.14
tbl.a(tbl.a<2) = 3.14
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Tables 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!