Mean automation from excel data

3 Ansichten (letzte 30 Tage)
Yogesh T L
Yogesh T L am 8 Apr. 2016
Kommentiert: Yogesh T L am 8 Apr. 2016
Hi, Let's say we have the following data, and I would like to obtain the mean of pressure for speed 20 only. Then I am also interested to obtain mean for speeds 40 only, 60 only... I am using excel for this but matlab would be a better option for automation from my opinion as the data is huge.Thank you.
  2 Kommentare
Muhammad Usman Saleem
Muhammad Usman Saleem am 8 Apr. 2016
can you add your sample excel file please? I want to check repeatition
Yogesh T L
Yogesh T L am 8 Apr. 2016
I am not able to understand what you mean by repetition because it varies each time I conduct the experiment. It's a big spreadsheet in excel and I am not willing to share the entire experimental data. Please don't hesitate to request for further details.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 8 Apr. 2016
ps = xlsread('yourdata.xlsx');
[speed,~,c] = unique(ps(:,2));
pressure_mean = accumarray(c,ps(:,1),[],@mean);
out = [pressure_mean, speed];

Weitere Antworten (0)

Kategorien

Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by