How to calculate the average columns values for a table in matlab ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
ahmed obaid
am 31 Mär. 2017
Kommentiert: ahmed obaid
am 31 Mär. 2017
Dear Experiences
i have a data table include numeric values .. i need to calculate the average values of table columns and then eliminate columns their average less than certain values (such as 0.002) , then write new table to new excel file. i will thanks any one can give a help on this duty ..
attached my portion of data table (when its imported to matlab using read table function)
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 31 Mär. 2017
Bearbeitet: Andrei Bobrov
am 31 Mär. 2017
EDIT
x = readtable('test.xls');
k = .002;
t = varfun(@isnumeric, x,'OutputFormat','uniform');
x1 = x(:,t);
out = [x(:,~t), x1(:,varfun(@mean, x1,'OutputFormat','uniform') > k)];
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!