Mean automation from excel data
1 次查看(过去 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
2016-4-8
can you add your sample excel file please? I want to check repeatition
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!