Mean automation from excel data

3 次查看(过去 30 天)
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 个评论
Muhammad Usman Saleem
can you add your sample excel file please? I want to check repeatition
Yogesh T L
Yogesh T L 2016-4-8
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.

请先登录,再进行评论。

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by