Count smaller than 15 cells in the table coulumns
Mostra commenti meno recenti
I have a 125*5 table, I want to know how many cells are smaller than 15 in each column of tmax_m, tmin_m, rrr24, tm_m separately.
something like this:
I attached my table (myresults.mat) for you.
Thank you and Best Regards
Risposta accettata
Più risposte (1)
Andrei Bobrov
il 16 Gen 2020
Modificato: Andrei Bobrov
il 16 Gen 2020
T = varfun(@funir,results_excel,'I',2:5);
T.Properties.VariableNames = results_excel.Properties.VariableNames(2:end);
T.stationNames = {'Number of smaller than 15 cells'};
out = [results_excel;T(:,[end,1:end-1])];
function out = funir(x)
out = sum(x < 15);
end
Categorie
Scopri di più su Tables in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!